Last active
March 19, 2019 19:20
-
-
Save Sigurd00/843030778bca34e30580fe53d6c04b52 to your computer and use it in GitHub Desktop.
Redirects to the new Runescape Wiki
This file contains 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 Runescape Wiki Redirect | |
// @version 1.2.3 | |
// @grant none | |
// @match *://runescape.fandom.com/* | |
// @match *://oldschoolrunescape.fandom.com/* | |
// @run-at document-start | |
// @description Redirects to the new Runescape Wiki on both Runescape 3 and Old School Runescape | |
// ==/UserScript== | |
var current_location = window.document.location.toString(); | |
if (window.location.href.indexOf("oldschoolrunescape.fandom.com") > -1){ | |
var new_location = current_location.replace("oldschoolrunescape.fandom.com","oldschool.runescape.wiki"); | |
window.location.replace(new_location); | |
} | |
else if (window.location.href.indexOf("runescape.fandom.com") > -1){ | |
var new_location = current_location.replace(".fandom.com/wiki",".wiki/w"); | |
window.location.replace(new_location); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment