Skip to content

Instantly share code, notes, and snippets.

@likaci
Last active April 3, 2016 14:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save likaci/80c99f846ebcad299363 to your computer and use it in GitHub Desktop.
Save likaci/80c99f846ebcad299363 to your computer and use it in GitHub Desktop.
稀土掘金/程序师 自动跳转到源页面
// ==UserScript==
// @name 稀土掘金/程序师 自动跳转到源页面
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author likaci
// @match http://gold.xitu.io/entry/*
// @match http://www.techug.com/*
// @grant none
// ==/UserScript==
/* jshint -W097 */
'use strict';
var url =
//http://gold.xitu.io/entry/* //http://www.techug.com/*
document.querySelector("body > div > a:nth-child(2)") || document.querySelector("div.src_en > p > a");
url = url.href;
document.location.href = url;
@likaci
Copy link
Author

likaci commented Mar 15, 2016

稀土掘金/程序师 自动跳转到源页面

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment