Skip to content

Instantly share code, notes, and snippets.

@Sigurd00
Last active March 19, 2019 19:20
Show Gist options
  • Save Sigurd00/843030778bca34e30580fe53d6c04b52 to your computer and use it in GitHub Desktop.
Save Sigurd00/843030778bca34e30580fe53d6c04b52 to your computer and use it in GitHub Desktop.
Redirects to the new Runescape Wiki
// ==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