Skip to content

Instantly share code, notes, and snippets.

@JonathanMH
Created September 9, 2022 15:21
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 JonathanMH/a811d6ccf76c93dd34eec9a9263bd583 to your computer and use it in GitHub Desktop.
Save JonathanMH/a811d6ccf76c93dd34eec9a9263bd583 to your computer and use it in GitHub Desktop.
Tampermonkey tarkov wiki fixer
// ==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