Last active
August 25, 2022 12:43
-
-
Save KingBain/a3387b740b7d94813ae04c814ffd1886 to your computer and use it in GitHub Desktop.
Removes the left nav panel for wiki.js users, works in tampermonkey and greasemonkey
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name hide-wikijs-panel | |
// @author John Bain | |
// @version 0.2.1 | |
// @match https://docs.scienceprogram.cloud/* | |
// @exclude https://docs.scienceprogram.cloud/a/* | |
// @description Hides the Nav Panel in Wiki.js | |
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js | |
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js | |
// @grant GM_addStyle | |
// @grant GM.getValue | |
// ==/UserScript== | |
//- The @grant directives are needed to restore the proper sandbox. | |
/* global $, waitForKeyElements */ | |
//resize main panel to full width... remove the padding via css | |
GM_addStyle ( '.v-main {padding: 0px !important;}' ); | |
//wait for nav bar to load and remove it once it loads | |
waitForKeyElements ("#app > div > nav", removeNode); | |
function removeNode (jNode) { | |
jNode.remove (); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment