-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcn-proxy.user.js
More file actions
29 lines (28 loc) · 944 Bytes
/
cn-proxy.user.js
File metadata and controls
29 lines (28 loc) · 944 Bytes
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
// ==UserScript==
// @name cn-proxy
// @namespace https://github.com/WingGao/ProxyChecker
// @version 1.2
// @description get proxy
// @match http://cn-proxy.com/
// @copyright 2017+, WingGao
// ==/UserScript==
function getProxy() {
var list = [];
jQuery('tbody tr').each(function (i, ele) {
var $ele = $(ele);
//console.log($ele);
//console.log($ele.children()[0]);
list.push('http://' + $ele.children()[0].innerHTML + ':' + $ele.children()[1].innerHTML);
//console.log('"http://'+ $ele.children()[0].innerHTML+':'+$ele.children()[1].innerHTML+'",');
});
var thtml = '';
list.forEach(function (l) {
thtml += l + "<br>"
});
$('body').html(thtml);
}
window.addEventListener('load', function () {
window.$ = jQuery;
$('.current_page_item').append('<button id="wing-action">GETPROXY</button>');
$('#wing-action').click(getProxy);
}, false);