Skip to content

Instantly share code, notes, and snippets.

@Vusys
Last active April 1, 2023 09:45
Show Gist options
  • Star 11 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Vusys/a9451ee719e27a4eb1fc05dcb2e60588 to your computer and use it in GitHub Desktop.
Save Vusys/a9451ee719e27a4eb1fc05dcb2e60588 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Wikipedia Vector
// @author Vusys
// @match *://*.wikipedia.org/*
// @exclude *://*.wikipedia.org/
// @grant none
// @license MIT
// ==/UserScript==
(function() {
const url = new URL(window.location.href);
if(url.toString().indexOf('useskin') === -1){
url.searchParams.set('useskin', 'vector');
location.replace(url);
}
const a = document.getElementsByTagName('a');
for (var i = 0; i < a.length; ++i){
if(a[i].href.indexOf('wikipedia.org') === -1){
continue;
}
let href = new URL(a[i].href);
href.searchParams.set('useskin', 'vector');
a[i].href = href;
}
})();
@ramzialhaddad
Copy link

Thanks for this lol. Hate the redesign.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment