Last active
March 31, 2019 19:18
-
-
Save robertgzr/b75103f02445f60478e338452449ab22 to your computer and use it in GitHub Desktop.
user.js
This file contains hidden or 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== | |
// @description Redirects golang.org/pkg documentation to godoc.org | |
// @name GolangDoc redirect | |
// @namespace gist.github.com/robertgzr | |
// @homepage gist.github.com/robertgzr/b75103f02445f60478e338452449ab22 | |
// @include http://golang.org/pkg/* | |
// @include https://golang.org/pkg/* | |
// @version 1.0 | |
// @run-at document-start | |
// @grant none | |
// @downloadURL https://gist.github.com/robertgzr/b75103f02445f60478e338452449ab22/raw/godoc-redirect.user.js | |
// @updateURL https://gist.github.com/robertgzr/b75103f02445f60478e338452449ab22/raw/godoc-redirect.user.js | |
// ==/UserScript== | |
var a = 0; | |
setInterval(function () { | |
if (a === 0 && window.location.href.indexOf('pkg') > -1) { | |
a = '//godoc.org/' + window.parent.location.href.split('/pkg/')[1]; | |
window.location.replace(a); | |
} | |
}, 10); |
This file contains hidden or 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== | |
// @description Redirects solus-project.com to getsol.us | |
// @name SolusProject redirect | |
// @namespace gist.github.com/robertgzr | |
// @homepage gist.github.com/robertgzr/b75103f02445f60478e338452449ab22 | |
// @include http://*.solus-project.com/* | |
// @include https://*.solus-project.com/* | |
// @version 1.0 | |
// @run-at document-start | |
// @grant none | |
// @downloadURL https://gist.github.com/robertgzr/b75103f02445f60478e338452449ab22/raw/solus-redirect.user.js | |
// @updateURL https://gist.github.com/robertgzr/b75103f02445f60478e338452449ab22/raw/solus-redirect.user.js | |
// ==/UserScript== | |
var a = 0; | |
setInterval(function () { | |
if (a === 0 && window.location.href.indexOf('.com/') > -1) { | |
a = '//getsol.us/' + window.parent.location.href.split('.com/')[1]; | |
window.location.replace(a); | |
} | |
}, 10); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment