diff --git a/appinfo/app.php b/appinfo/app.php index 13ab005..a23dcb6 100755 --- a/appinfo/app.php +++ b/appinfo/app.php @@ -1,7 +1,5 @@ getEventDispatcher(); if(\OC_User::isLoggedIn()) { - $eventDispatcher->addListener('OCA\Files::loadAdditionalScripts', function() { - OCP\Util::addScript('hidesidebars', 'script'); - }); + OCP\Util::addScript('hidesidebars', 'script'); } diff --git a/appinfo/info.xml b/appinfo/info.xml index 04bea01..d7b6e0e 100755 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -16,7 +16,7 @@ Examples: http://nextcloud.example.com/index.php/apps/files/?hide-sidebars http://nextcloud.example.com/index.php/apps/files/?dir=/New%20folder&hide-sidebars ```]]> - 1.0.6 + 1.0.7 agpl Radoslav Stofko HideSidebars @@ -26,6 +26,6 @@ http://nextcloud.example.com/index.php/apps/files/?dir=/New%20folder&hide-sideba https://github.com/pointcz/hidesidebars https://raw.githubusercontent.com/pointcz/hidesidebars/master/.readme/hidesidebars.png - + diff --git a/js/script.js b/js/script.js index b4334eb..b13aefa 100755 --- a/js/script.js +++ b/js/script.js @@ -1,6 +1,4 @@ $(document).ready(function () { - if (!OCA.Files) return; - if (getParameterByName('hide-sidebars') !== null) { hideSidebars(); } @@ -16,12 +14,12 @@ $(document).ready(function () { } function hideSidebars () { - $('#header').hide(); - $('#app-navigation').hide(); + $('#header,#app-navigation,#app-navigation-vue,.app-navigation-toggle').hide(); $('#app-content').css('margin-left', 0); - $('#content').css('padding-top', 0); - $('#controls').css('top', 0); + $('#content,#content-vue').css('padding-top', 0); + $('#controls').css('top', 0).css('padding-left', 0); $('#filestable thead').css('top', '44px'); + $('#app-navigation-toggle').css('z-index', 0); } });