Skip to content

Commit 5cef91d

Browse files
committed
fix
1 parent 58c3730 commit 5cef91d

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

HacgGodTurn/HacgGodTurn.user.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
// @include http*://htai.*
5050
// @include http*://gmgard.com/*
5151
// @include http*://*.gmgard.com/*
52-
// @version 3.20.40
52+
// @version 3.20.41
5353
// @grant GM_notification
5454
// @grant GM_xmlhttpRequest
5555
// @run-at document-end
@@ -561,6 +561,19 @@
561561
}
562562
}
563563
}
564+
var bgLi=document.createElement("li");
565+
bgLi.innerHTML="<a><i class='fa fa-star'></i>\u5f53\u524d\u80cc\u666f\u56fe\u7247</a>";
566+
var bgs=document.querySelectorAll(".cb-slideshow>li>span");
567+
bgLi.onclick=function(){
568+
for(var i=0;i<bgs.length;i++){
569+
var bg=bgs[i];
570+
if(getComputedStyle(bg).opacity==1){
571+
var url=getComputedStyle(bg).backgroundImage.replace(/url\("([^"]+)"\)/,"$1");
572+
window.open(url);
573+
}
574+
}
575+
}
576+
document.querySelector("ul.navbar-nav").appendChild(bgLi);
564577
break;
565578
case "gmgard":
566579
if(isHttps)addInsertHandler([["img"],[['p(:\\\/\\\/static\.gmgard\.com)','ps$1']]]);

0 commit comments

Comments
 (0)