diff --git a/php/public/disable-onlyoffice.js b/php/public/disable-onlyoffice.js index b4d30dec..f9c7eebc 100644 --- a/php/public/disable-onlyoffice.js +++ b/php/public/disable-onlyoffice.js @@ -1,9 +1,7 @@ document.addEventListener("DOMContentLoaded", function(event) { // OnlyOffice - try { - var onlyoffice = document.getElementById("onlyoffice"); + var onlyoffice = document.getElementById("onlyoffice"); + if (onlyoffice) { onlyoffice.disabled = true; - } catch (error) { - // console.error(error); } }); \ No newline at end of file diff --git a/php/public/options-form-submit.js b/php/public/options-form-submit.js index e602f177..6d017315 100644 --- a/php/public/options-form-submit.js +++ b/php/public/options-form-submit.js @@ -13,11 +13,9 @@ document.addEventListener("DOMContentLoaded", function(event) { clamav.addEventListener('change', makeOptionsFormSubmitVisible); // OnlyOffice - try { - var onlyoffice = document.getElementById("onlyoffice"); + var onlyoffice = document.getElementById("onlyoffice"); + if (onlyoffice) { onlyoffice.addEventListener('change', makeOptionsFormSubmitVisible); - } catch (error) { - // console.error(error); } // Collabora