Skip to content

Commit c90f51a

Browse files
committed
fix
1 parent cbceb97 commit c90f51a

1 file changed

Lines changed: 11 additions & 10 deletions

File tree

HacgGodTurn/HacgGodTurn.user.js

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,15 @@
7575
// @include http*://www.l-sj.cc/*
7676
// @include http*://htacg.cc/*
7777
// @include http*://www.htacg.cc/*
78-
// @version 3.21.25
78+
// @version 3.21.26
7979
// @grant GM_notification
8080
// @grant GM_xmlhttpRequest
8181
// @grant GM_setClipboard
8282
// @grant GM_setValue
8383
// @grant GM_getValue
8484
// @grant unsafeWindow
8585
// @run-at document-end
86-
// @require https://greasyfork.org/scripts/23522/code/od.js?version=167311
86+
// @require https://greasyfork.org/scripts/23522/code/od.js?version=167534
8787
// @require https://cdn.jsdelivr.net/crypto-js/3.1.2/components/core-min.js
8888
// @require https://cdn.jsdelivr.net/crypto-js/3.1.2/rollups/aes.js
8989
// @license MIT License
@@ -380,7 +380,7 @@
380380
};
381381
}
382382

383-
var t, curSite, curArticle, copyData, siteListHtml;
383+
var t, curSite, curArticle, siteListHtml;
384384
var originTitile = document.title;
385385
var isHttps=location.protocol=="https:";
386386
if(isHttps){
@@ -978,7 +978,10 @@
978978
if(curArticle)curArticle.classList.remove("oD_sel");
979979
});
980980
document.addEventListener("copy", function(e) {
981-
copyData=document.getSelection().toString();
981+
var copyData=document.getSelection().toString();
982+
if(copyData && oD_text){
983+
oD_text.value=copyData;
984+
}
982985
});
983986

984987
document.getElementsByTagName("head")[0].appendChild(nod);
@@ -1002,29 +1005,27 @@
10021005
alert("\u68c0\u6d4b\u5230\u0049\u0044\u51b2\u7a81\uff01\u8bf7\u68c0\u67e5\u662f\u5426\u5b58\u5728\u91cd\u590d\u811a\u672c\u6216\u540c\u7c7b\u811a\u672c");
10031006
}
10041007
},500);
1008+
var oD_box,oD_text,oD_button;
10051009
if((!curSite || !curSite.hideOd) && !frameElement){
1006-
var oD_box=document.createElement("div");
1010+
oD_box=document.createElement("div");
10071011
oD_box.id="oD_box";
10081012
oD_box.className = "oD_box";
10091013
oD_box.onmouseover = function(e) {
10101014
oD_link.style.visibility = "visible";
10111015
oD_link2.style.visibility = "visible";
10121016
rocketBtn.style.visibility = "visible";
1013-
if(copyData && !oD_text.value){
1014-
oD_text.value=copyData;
1015-
}
10161017
};
10171018
oD_box.onmouseout = function(e) {
10181019
oD_link.style.visibility = "hidden";
10191020
oD_link2.style.visibility = "hidden";
10201021
rocketBtn.style.visibility = "hidden";
10211022
};
1022-
var oD_text=document.createElement("input");
1023+
oD_text=document.createElement("input");
10231024
oD_text.type="text";
10241025
oD_text.style.cssText="width:168px;height:33px;position:relative;margin-top:0px;padding:0px;box-sizing:border-box;z-index:0";
10251026
oD_text.placeholder="输入hash值或网盘地址";
10261027
oD_text.title='将自动添加"magnet:?xt=urn:btih:"并去除非法字符';
1027-
var oD_button=document.createElement("button");
1028+
oD_button=document.createElement("button");
10281029
oD_button.type="button";
10291030
oD_button.textContent="开车";
10301031
oD_button.style.cssText="padding:4px 0;position: absolute;top:-1px;right:0px;width:40px;height:35px";

0 commit comments

Comments
 (0)