Skip to content

Instantly share code, notes, and snippets.

@Vusys
Created November 3, 2017 08:47
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 Vusys/7578db85e984268a0ab7b212acbf7854 to your computer and use it in GitHub Desktop.
Save Vusys/7578db85e984268a0ab7b212acbf7854 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Wikia Monobook
// @include *.wikia.com/*
// @grant none
// ==/UserScript==
(function() {
var loc = window.location.toString();
if(loc.indexOf('useskin=monobook') === -1){
location.replace(loc + (loc.indexOf('?') === -1 ? '?useskin=monobook' : '&useskin=monobook' ) );
}
var a = document.getElementsByTagName('a');
for (var i = 0; i < a.length; ++i){
if(a[i].href.indexOf('wikia.com') === -1){
continue;
}
a[i].href = a[i].href + (a[i].href.indexOf('?') === -1 ? '?useskin=monobook' : '&useskin=monobook');
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment