Skip to content

Instantly share code, notes, and snippets.

@radthemad4
Last active August 13, 2021 03:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save radthemad4/7a6ef11d9ac97b26b8e92b5ad3590a05 to your computer and use it in GitHub Desktop.
Save radthemad4/7a6ef11d9ac97b26b8e92b5ad3590a05 to your computer and use it in GitHub Desktop.
dnd-wiki sidebar unfuckerupper
// ==UserScript==
// @name dnd-wiki unfuckerupper
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Reduce the amount of screenspace the navigation sidebar takes up
// @author You
// @match https://dnd-wiki.org/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
document.getElementById('p-namespaces').style.paddingLeft = '0';
document.getElementById('content').style.marginLeft = '175px';
let noPrintElements = document.getElementsByClassName("noprint");
if (noPrintElements.length > 0) {
noPrintElements[0].remove();
}
let vmPlacementElements = document.getElementsByClassName("vm-placement");
for(let element of vmPlacementElements){
element.remove();
}
let logo = document.getElementById('p-logo');
logo.style.left = '0px';
logo.style.cssText += ';height: 90px !important;';
logo.style.cssText += ';width: 160px !important;';
for (let image of logo.getElementsByTagName('img')){
image.height = '90px';
image.width = '140px';
image.style.height = '90px';
image.style.width = '140px';
}
let content = document.getElementById('content');
content.style.marginTop = '0px';
let mwHead = document.getElementById('mw-head');
mwHead.style.top = '1px';
mwHead.style.cssText += ';max-width:none;';
let panel = document.getElementById('mw-panel');
panel.style.width = '160px';
panel.style.cssText += ';top: 0px !important;';
document.getElementById('p-logo').style.top = '0px';
for(let item of panel.getElementsByTagName('li')){
item.style.fontSize = '0.8em';
}
for(let item of panel.getElementsByTagName('h3')){
item.style.fontSize = '0.8em';
}
for(let item of document.getElementById('p-personal').getElementsByTagName('li')) {
item.style.fontSize = '0.8em';
}
document.body.style.maxWidth = 'none';
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment