From c31b5aa6c03ecf9b958cf17616eb9a988ef734d3 Mon Sep 17 00:00:00 2001 From: ansuz Date: Wed, 10 Jan 2018 11:59:06 +0100 Subject: [PATCH] make extension point cover share menu for files --- www/common/toolbar3.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/www/common/toolbar3.js b/www/common/toolbar3.js index 6a0016fcf..76062a5c3 100644 --- a/www/common/toolbar3.js +++ b/www/common/toolbar3.js @@ -8,8 +8,7 @@ define([ '/common/common-feedback.js', '/customize/messages.js', '/common/clipboard.js', - '/common/hyperscript.js', -], function ($, Config, ApiConfig, UIElements, UI, Hash, Feedback, Messages, Clipboard, h) { +], function ($, Config, ApiConfig, UIElements, UI, Hash, Feedback, Messages, Clipboard) { var Common; var Bar = { @@ -498,7 +497,9 @@ define([ }); } if (typeof(Config.customizeShareOptions) === 'function') { - Config.customizeShareOptions(hashes, options); + Config.customizeShareOptions(hashes, options, { + type: 'DEFAULT', + }); } var dropdownConfigShare = { text: $('
').append($shareIcon).html(), @@ -586,6 +587,13 @@ define([ attributes: {title: Messages.fileEmbedTitle, 'class': 'cp-toolbar-share-file-embed'}, content: ' ' + Messages.getEmbedCode }); + + if (typeof(Config.customizeShareOptions) === 'function') { + Config.customizeShareOptions(hashes, options, { + type: 'FILE' + }); + } + var dropdownConfigShare = { text: $('
').append($shareIcon).html(), options: options,