Skip to content

Commit

Permalink
hide sidebars in all apps, set max version to 20
Browse files Browse the repository at this point in the history
  • Loading branch information
radoslavius authored and Radoslav Štofko committed Dec 7, 2020
1 parent 22b79e8 commit 85918f5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
4 changes: 1 addition & 3 deletions appinfo/app.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php
$eventDispatcher = \OC::$server->getEventDispatcher();
if(\OC_User::isLoggedIn()) {
$eventDispatcher->addListener('OCA\Files::loadAdditionalScripts', function() {
OCP\Util::addScript('hidesidebars', 'script');
});
OCP\Util::addScript('hidesidebars', 'script');
}
4 changes: 2 additions & 2 deletions appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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
```]]></description>
<version>1.0.6</version>
<version>1.0.7</version>
<licence>agpl</licence>
<author mail="rstofko@gmail.com" >Radoslav Stofko</author>
<namespace>HideSidebars</namespace>
Expand All @@ -26,6 +26,6 @@ http://nextcloud.example.com/index.php/apps/files/?dir=/New%20folder&hide-sideba
<repository>https://github.com/pointcz/hidesidebars</repository>
<screenshot>https://raw.githubusercontent.com/pointcz/hidesidebars/master/.readme/hidesidebars.png</screenshot>
<dependencies>
<nextcloud min-version="15" max-version="19"/>
<nextcloud min-version="15" max-version="20"/>
</dependencies>
</info>
10 changes: 4 additions & 6 deletions js/script.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
$(document).ready(function () {
if (!OCA.Files) return;

if (getParameterByName('hide-sidebars') !== null) {
hideSidebars();
}
Expand All @@ -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);
}

});

0 comments on commit 85918f5

Please sign in to comment.