diff --git a/README.md b/README.md
index a2e8eaa2dc7360b921da5aadf4840483ec3e685e..68704d01252bf5d6080b188610881475b078e769 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1 @@
-# multi-office
-
+# Multi Office
diff --git a/appinfo/info.xml b/appinfo/info.xml
index 954588726be6a96588a29d02089cefe828689fbc..bbbf3b4d2894a8b93cb070a4c087b0cdcc455120 100644
--- a/appinfo/info.xml
+++ b/appinfo/info.xml
@@ -14,10 +14,4 @@
${title}
`; - menu.insertBefore(separator, firtEl.parentNode); - }; + menu.insertBefore(separator, firtEl.parentNode); + }; - const addExtension = (selector) => { - const elements = document.querySelectorAll(selector); - for (const el of elements) { - const span = document.createElement("span"); - span.classList.add("menu-item-extension"); - span.innerText = el.getAttribute("data-templatename").split(".")[1]; - el.appendChild(span); - } - }; + const addExtension = (selector) => { + const elements = document.querySelectorAll(selector); + for (const el of elements) { + const span = document.createElement("span"); + span.classList.add("menu-item-extension"); + span.innerText = el.getAttribute("data-templatename").split(".")[1]; + el.appendChild(span); + } + }; - addSeparator( - '.newFileMenu .menuitem[data-action*="template-new-onlyoffice"]', - "ONLYOFFICE" - ); - addSeparator( - '.newFileMenu .menuitem[data-action*="template-new-richdocument"]', - "LIBREOFFICE" - ); + addSeparator( + '.newFileMenu .menuitem[data-action*="template-new-onlyoffice"]', + "ONLYOFFICE" + ); + addSeparator( + '.newFileMenu .menuitem[data-action*="template-new-richdocument"]', + "LIBREOFFICE" + ); - addExtension( - '.newFileMenu .menuitem[data-action*="template-new-onlyoffice"]' - ); - addExtension( - '.newFileMenu .menuitem[data-action*="template-new-richdocument"]' - ); - }; - setTimeout(refreshMenu); - document.querySelector(".new").addEventListener("click", refreshMenu); - }, -}); + addExtension( + '.newFileMenu .menuitem[data-action*="template-new-onlyoffice"]' + ); + addExtension( + '.newFileMenu .menuitem[data-action*="template-new-richdocument"]' + ); + }; + setTimeout(refreshMenu); + document.querySelector(".new").addEventListener("click", refreshMenu); + }, + }) +); diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php new file mode 100644 index 0000000000000000000000000000000000000000..9cae642af4db0cc43b9c7581300056f0a9c70679 --- /dev/null +++ b/lib/AppInfo/Application.php @@ -0,0 +1,20 @@ +getEventDispatcher(); + $eventDispatcher->addListener('OCA\Files::loadAdditionalScripts', function() { + script('multioffice', 'script'); + style('multioffice', 'style'); + }); + } + +}