I'm trying to use Tampermonkey to remove the right rail of a page. Every page in the fandom.com wikis, contains a right rail, which is usually distracting me from focusing on the main content.
The element, according to DevTools looks like this:
<div class="page has-right-rail">
<main class="page__main" lang="en"> *content* </main>
<aside class="page__right-rail">*content to be removed*</aside>
</div>
I usually delete it manually (it's the <aside class="page__right-rail>...</aside>"
element).
Here is an example page that has the thing. If possible, I'd like the script to work on *something.*fandom.com/wiki/*something*
.
Here is the current version of my script:
// ==UserScript==
// @name Remove Right Rail from Fandom
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match http://*.fandom.com/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
// ==/UserScript==
(function() {
'use strict';
// Your code here...
document.querySelector('aside.page__right-rail').remove();
})();