diff --git a/www/common/onlyoffice/inner.js b/www/common/onlyoffice/inner.js index 0e358f386..fed0399f1 100644 --- a/www/common/onlyoffice/inner.js +++ b/www/common/onlyoffice/inner.js @@ -457,6 +457,22 @@ define([ deleteOfflineLocks(); APP.onLocal(); handleNewLocks(oldLocks, content.locks || {}); + + var observer = new MutationObserver(function(mutations) { + mutations.forEach(function(mutation) { + if (mutation.type === "childList") { + for (var i = 0; i < mutation.addedNodes.length; i++) { + if (mutation.addedNodes[i].classList.contains('asc-window') && + mutation.addedNodes[i].classList.contains('alert')) { + $(mutation.addedNodes[i]).find('button').not('.custom').click(); + } + } + } + }); + }); + observer.observe(window.frames[0].document.body, { + childList: true, + }); }; // Add a lock @@ -625,6 +641,8 @@ define([ var $tb = $('iframe[name="frameEditor"]').contents().find('head'); var css = '#id-toolbar-full .toolbar-group:nth-child(2), #id-toolbar-full .separator:nth-child(3) { display: none; }' + '#fm-btn-save { display: none !important; }' + + '#panel-settings-general tr.autosave { display: none !important; }' + + '#panel-settings-general tr.coauth { display: none !important; }' + '#header { display: none !important; }'; $('