diff --git a/www/common/inner/share.js b/www/common/inner/share.js index eeea74e7f..7e2f0a6b0 100644 --- a/www/common/inner/share.js +++ b/www/common/inner/share.js @@ -16,6 +16,15 @@ define([ Messages, nThen, Pages) { var Share = {}; + var embeddableApps = [ + 'code', + 'form', + 'kanban', + 'pad', + 'slide', + 'whiteboard', + ].map(app => `/${app}/`); + var createShareWithFriends = function (config, onShare, linkGetter) { var common = config.common; var sframeChan = common.getSframeChannel(); @@ -772,7 +781,7 @@ define([ icon: "fa fa-link", active: !contactsActive, }]; - if (!opts.static && !ApiConfig.disableEmbedding) { + if (!opts.static && !ApiConfig.disableEmbedding && embeddableApps.includes(pathname)) { tabs.push({ getTab: getEmbedTab, title: Messages.share_embedCategory, diff --git a/www/common/sframe-common-outer.js b/www/common/sframe-common-outer.js index 87cfa6f7e..ed6962328 100644 --- a/www/common/sframe-common-outer.js +++ b/www/common/sframe-common-outer.js @@ -9,22 +9,14 @@ define([ var common = {}; var embeddableApps = [ - //'calendar', 'code', - //'doc', // XXX - // 'drive', // XXX - //'file', // doesn't suggest iframes 'form', 'kanban', 'pad', - // 'poll', // XXX - //'presentation', // XXX - // 'sheet', // XXX 'slide', - //'teams', // XXX 'whiteboard', ].map(function (x) { - return `/${x}/`; // XXX intentionally break IE or anything that doesn't support template literals + return `/${x}/`; }); common.initIframe = function (waitFor, isRt, pathname) {