-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxclient.user.js
26 lines (23 loc) · 913 Bytes
/
xclient.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
// ==UserScript==
// @name XClient设置下载链接
// @namespace http://www.farwmarth.com/
// @version 0.1
// @description XClient
// @author far
// @match http://xclient.info/*
// @grant unsafeWindow
// ==/UserScript==
(function() {
var host = location.host;
if(host == 'xclient.info'&&location.href.indexOf("a=dl")!=-1){
var btn_down_link =document.getElementsByClassName("btn_down_link")[0];
var code =btn_down_link .getAttribute("data-clipboard-text");
if (code){
var url =btn_down_link .getAttribute("data-link");
var href_txt = "<a class='btn_down_link pop_btn' href='" + url + "#" + code + "' target='_blank'>" + '去下载' + '</a>';
console.log(code);
var down_wrap =document.getElementsByClassName("down_wrap")[0];
down_wrap.innerHTML = href_txt;
}
}
})();