Created
September 9, 2022 15:21
-
-
Save JonathanMH/a811d6ccf76c93dd34eec9a9263bd583 to your computer and use it in GitHub Desktop.
Tampermonkey tarkov wiki fixer
This file contains hidden or 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 Tarkov Wiki fixer | |
// @namespace https://escapefromtarkov.fandom.com | |
// @version 0.1 | |
// @description Remove bullshit elements that nobody needs in the fandom wiki | |
// @author JonathanMH | |
// @match https://escapefromtarkov.fandom.com/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
// Add to these if more annoying elements show up | |
const undesiredElementSelectors = ['.global-navigation', '#WikiaBarWrapper']; | |
const hideElement = (selector) => { | |
try { | |
const undesiredElement = document.querySelector(selector); | |
if(undesiredElement) { | |
undesiredElement.style.display = 'none'; | |
} | |
} catch(e) { | |
console.log('could not hide element in user script', e); | |
} | |
}; | |
undesiredElementSelectors.forEach(el => { | |
hideElement(el) | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment