Created
October 31, 2014 14:22
-
-
Save shuding/b1249c2b5e6f2abd4ff4 to your computer and use it in GitHub Desktop.
V2EX inbox invite code
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 Refresh and search for 'inbox' | |
// @namespace http://github.com/quietshu | |
// @version 0.1 | |
// @description 简易检测 V2EX 有没有人发新的邀请码 = = | |
// @match http://www.v2ex.com/ | |
// @copyright 2014, Shu Ding | |
// ==/UserScript== | |
var regexp = /inbox|Inbox/g; | |
var match, matches = 0; | |
while ((match = regexp.exec(document.documentElement.innerHTML)) != null) { | |
++matches; | |
} | |
document.title = "(" + matches + ") V2EX"; | |
setTimeout(function(){ | |
window.location.reload(); | |
}, 10000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment