Jump to content

User:Weeklyd3/scripts/linkRemover.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Weeklyd3 (talk | contribs) at 03:01, 19 March 2022 (Recover from missing ID). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
/* Hides some links I do not frequently use. */
(function() {
	var idsToHide = ["t-mute",
	'n-portal', 
	'n-help', 
	'n-introduction',
	'n-currentevents',
	'n-contents',
	'n-aboutsite',
	'n-contactpage',
	'n-sitesupport'];
	if (!globalThis.hiddenLeft) globalThis.hiddenLeft = idsToHide;
	for (var i = 0; i < globalThis.hiddenLeft.length; i++) {
		var link = document.querySelector('li#' + globalThis.hiddenLeft[i]);
		if (!link) continue;
		link.style.display = 'none';
	}
})();