-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhdu-helper2.user.js
executable file
·33 lines (32 loc) · 1000 Bytes
/
hdu-helper2.user.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// ==UserScript==
// @name hdu helper2
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author ismdeep
// @require https://code.jquery.com/jquery-2.1.4.min.js
// @match http://acm.hdu.edu.cn/listproblem.php?vol=*
// @grant none
// ==/UserScript==
(function() {
'use strict';
var con = document.getElementsByTagName('tr');
for (var i = con.length - 1; i >= 0; i--) {
if (con[i].innerHTML.indexOf('showproblem.php?pid=') >= 0) {
let flag = false;
try{
if (parseInt(con[i].lastChild.firstElementChild.innerHTML) < 500) {
flag = true;
}
}catch(e){}
try{
if (con[i].innerHTML.indexOf('images/ac.gif') >= 0) {
flag = true;
}
}catch(e){}
if (flag) {
con[i].remove();
}
}
}
})();