Skip to content

Commit d1df18d

Browse files
committed
fix
1 parent 50c8e03 commit d1df18d

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

HacgGodTurn/HacgGodTurn.user.js

Lines changed: 4 additions & 3 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.10
75+
// @version 3.21.11
7676
// @grant GM_notification
7777
// @grant GM_xmlhttpRequest
7878
// @grant GM_setClipboard
@@ -695,7 +695,7 @@
695695
for(var i=0;i<bgs.length;i++){
696696
var bg=bgs[i];
697697
if(getComputedStyle(bg).opacity>.5){
698-
var url=getComputedStyle(bg).backgroundImage.replace(/url\("([^"]+)"\)/,"$1");
698+
var url=getComputedStyle(bg).backgroundImage.replace(/url\("?([^"]+)"?\)/,"$1");
699699
window.open(url);
700700
}
701701
}
@@ -752,8 +752,9 @@
752752
bgUrls+=curReg[0]+"\n";
753753
}
754754
var rmBg=document.querySelector("div.large");
755-
if(rmBg)bgUrls+=getComputedStyle(rmBg).backgroundImage.replace(/url\("([^"]+)"\)/,"$1");
755+
if(rmBg)bgUrls+=getComputedStyle(rmBg).backgroundImage.replace(/url\("?([^"]+)"?\)/,"$1");
756756
GM_setClipboard(bgUrls);
757+
console.info(bgUrls);
757758
alert("背景图片链接复制完毕");
758759
}else{
759760
if(bgUrls!=""){

0 commit comments

Comments
 (0)