Skip to content

Instantly share code, notes, and snippets.

@exelotl
Last active March 1, 2020 17:18
Show Gist options
  • Save exelotl/c0c4b79932d977869811e518b2198b8c to your computer and use it in GitHub Desktop.
Save exelotl/c0c4b79932d977869811e518b2198b8c to your computer and use it in GitHub Desktop.
// ==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