Skip to content

Commit f06c850

Browse files
committed
fix
1 parent 5c55ee6 commit f06c850

2 files changed

Lines changed: 26 additions & 4 deletions

File tree

Easy offline/Easy offline.user.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// @namespace http://tampermonkey.net/
99
// @require https://cdn.jsdelivr.net/jquery/1.7.2/jquery.min.js
1010
// @require https://cdn.jsdelivr.net/hi-base64/0.2.0/base64.min.js
11-
// @version 1.3.10
11+
// @version 1.3.11
1212
// @author Hoothin
1313
// @mail rixixi@gmail.com
1414
// @include http*://*/*
@@ -364,6 +364,12 @@
364364
if(relatedTarget && !parentDiv[0].contains(relatedTarget))
365365
hideIcons();
366366
});
367+
parentDiv.mouseover(function(e){
368+
e.stopPropagation();
369+
});
370+
document.addEventListener("mouseover", function(e){
371+
hideIcons();
372+
});
367373
var preNode;
368374
if(showType){
369375
document.addEventListener("click", function(){

HacgGodTurn/HacgGodTurn.user.js

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
// @include http*://www.l-sj.cc/*
7676
// @include http*://htacg.cc/*
7777
// @include http*://www.htacg.cc/*
78-
// @version 3.21.36
78+
// @version 3.21.37
7979
// @grant GM_notification
8080
// @grant GM_xmlhttpRequest
8181
// @grant GM_setClipboard
@@ -105,6 +105,7 @@
105105
Ctrl+↑ ↓进入文章内容页或返回
106106
Alt+F8打开绅士站点列表
107107
Ctrl+F8打开火箭嗅探窗口
108+
Shiftl+F8开启或关闭NSFW模式
108109
109110
最ACG快捷键:
110111
点击图片去除和谐力量
@@ -386,11 +387,12 @@
386387
var t, curSite, curArticle, siteListHtml;
387388
var originTitile = document.title;
388389
var isHttps=location.protocol=="https:";
390+
var head=document.getElementsByTagName("head")[0];
389391
if(isHttps){
390392
var refMeta = document.createElement('meta');
391393
refMeta.name = 'referrer';
392394
refMeta.content = 'always';
393-
document.getElementsByTagName('head')[0].appendChild(refMeta);
395+
head.appendChild(refMeta);
394396
}else{
395397
if(document.title=="Service Unavailable - Connection Error"){
396398
location.href=location.href.replace(/^http:/,"https:");
@@ -856,6 +858,12 @@
856858
process();
857859
}
858860

861+
var hideNode=document.createElement("style");
862+
hideNode.id="hideNode";
863+
hideNode.innerHTML="img{display:none!important}";
864+
if(GM_getValue("hacgGodeTurnHideImg")){
865+
head.appendChild(hideNode);
866+
}
859867
document.addEventListener("keydown", function(e) {
860868
if(curArticle && e.keyCode != 17)curArticle.classList.remove("oD_sel");
861869
if(e.keyCode == 119) {
@@ -872,6 +880,14 @@
872880
rocketLinks.innerHTML=siteListHtml;
873881
}else if(e.ctrlKey){
874882
launchRocket();
883+
}else if(e.shiftKey){
884+
if(hideNode.parentNode){
885+
head.removeChild(hideNode);
886+
GM_setValue("hacgGodeTurnHideImg",false);
887+
}else{
888+
head.appendChild(hideNode);
889+
GM_setValue("hacgGodeTurnHideImg",true);
890+
}
875891
}else{
876892
var i=0;
877893
if(curSite)i=config.sites.indexOf(curSite);
@@ -987,7 +1003,7 @@
9871003
}
9881004
});
9891005

990-
document.getElementsByTagName("head")[0].appendChild(nod);
1006+
head.appendChild(nod);
9911007
var rocketContent=document.createElement("div");
9921008
document.body.appendChild(rocketContent);
9931009
rocketContent.outerHTML=rocketStr;

0 commit comments

Comments
 (0)