Last active
March 1, 2020 17:18
-
-
Save exelotl/c0c4b79932d977869811e518b2198b8c to your computer and use it in GitHub Desktop.
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 Nim Redirect to Latest Docs | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Redirect from "nim-lang.org" to the corresponding page on "nim-lang.github.io" | |
// @author exelotl | |
// @match https://nim-lang.org/docs/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict' | |
let ul = document.querySelector('#global-links > ul') | |
if (ul) { | |
let href = window.location.href.replace('https://nim-lang.org/docs/', 'https://nim-lang.github.io/Nim/') | |
window.location.replace(href) | |
} | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment