Skip to content

Commit b7be183

Browse files
committed
fix
1 parent cd49249 commit b7be183

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

HacgGodTurn/HacgGodTurn.user.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
// @include http*://yui-nya.com/*
7373
// @include http*://www.l-sj.cc/*
7474
// @include http*://htacg.cc/*
75-
// @version 3.21.07
75+
// @version 3.21.08
7676
// @grant GM_notification
7777
// @grant GM_xmlhttpRequest
7878
// @grant GM_setClipboard
@@ -694,6 +694,7 @@
694694
batchBg.classList.add("dropdown-menu");
695695
batchBg.innerHTML="<li><a href=\"javascript:void(0)\">复制当组背景图链接</a></li>";
696696
batchBg.onclick=function(e){
697+
e.stopPropagation();
697698
if(bgUrls==undefined){
698699
bgUrls="";
699700
/*for(let j=0;j<=maxCss;j++){
@@ -733,6 +734,8 @@
733734
for(var curReg of curRegs){
734735
bgUrls+=curReg[0]+"\n";
735736
}
737+
var rmBg=document.querySelector("div.large");
738+
if(rmBg)bgUrls+=getComputedStyle(rmBg).backgroundImage.replace(/url\("([^"]+)"\)/,"$1");
736739
GM_setClipboard(bgUrls);
737740
alert("背景图片链接复制完毕");
738741
}else{
@@ -741,7 +744,6 @@
741744
alert("背景图片链接复制完毕");
742745
}
743746
}
744-
e.stopPropagation();
745747
}
746748
bgLi.appendChild(batchBg);
747749
document.querySelector("ul.navbar-nav").appendChild(bgLi);

0 commit comments

Comments
 (0)