Skip to content

Commit 842e343

Browse files
committed
fix
1 parent 66dab33 commit 842e343

1 file changed

Lines changed: 25 additions & 15 deletions

File tree

HacgGodTurn.user.js

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@
4444
// @include http*://www.uraban.me/*
4545
// @include http*://acgmoon.*
4646
// @include http*://www.moe-acg.cc/*
47-
// @version 3.20.16
47+
// @include http*://htai.*
48+
// @version 3.20.17
4849
// @grant GM_notification
4950
// @grant GM_xmlhttpRequest
5051
// @run-at document-end
@@ -59,6 +60,7 @@
5960
// ==/UserScript==
6061

6162
(function(){
63+
'use strict';
6264
var config={
6365
sites:[
6466
{
@@ -208,6 +210,11 @@
208210
offset:55,
209211
hideOd:true,
210212
downloadUrl:/moe-acg\.cc\/download/
213+
},
214+
{
215+
name:"htai",
216+
url:"http://htai.co/",
217+
regex:/htai\.(co|me)/
211218
}
212219
],
213220
rocketReg:/magnet:\?xt|pan\.baidu\.com\/s|yunpan\.cn|howfile\.com\/file|mega\.|ed2k:\/\/\|file|bt\.cosxcos\.com\/view|du\.acgget\.com\/go\/|\.mediafire\.com\/download\/|\.torrent$/,
@@ -497,20 +504,19 @@
497504
break;
498505
case "acgmoon":
499506
contentArea="div.post-content";
500-
var warn=document.querySelector("div.kinky-warning");
501-
if(warn){
502-
var postContent=document.querySelector("div.post-content");
503-
if(postContent && postContent.classList.contains("hexie")){
504-
var hexieBtn=document.createElement("button");
505-
hexieBtn.id="hexieBtn";
506-
hexieBtn.type="button";
507-
hexieBtn.textContent="\u597d\u5b69\u5b50\u770b\u4e0d\u5230";
508-
hexieBtn.style="padding:4px 0;position: relative;width:120px;";
509-
hexieBtn.onclick=function(){
510-
postContent.classList.contains("hexie")?postContent.classList.remove("hexie"):postContent.classList.add("hexie");
511-
};
512-
warn.parentNode.insertBefore(hexieBtn,warn.nextSibling);
513-
}
507+
var postContent=document.querySelector("div.post-content");
508+
if(postContent && postContent.classList.contains("hexie")){
509+
var hexieBtn=document.createElement("button");
510+
hexieBtn.id="hexieBtn";
511+
hexieBtn.type="button";
512+
hexieBtn.textContent="\u597d\u5b69\u5b50\u770b\u4e0d\u5230";
513+
hexieBtn.style="padding:4px 0;position: relative;width:120px;";
514+
hexieBtn.onclick=function(){
515+
postContent.classList.contains("hexie")?postContent.classList.remove("hexie"):postContent.classList.add("hexie");
516+
};
517+
var warn=document.querySelector("div.kinky-warning");
518+
if(warn)warn.parentNode.insertBefore(hexieBtn,warn.nextSibling);
519+
else postContent.parentNode.insertBefore(hexieBtn,postContent);
514520
}
515521
break;
516522
case "acg15":
@@ -528,6 +534,10 @@
528534
case "acg18":
529535
changeUrl(true,[["a"],[['https?:\\\/\\\/[^\\\.]*(\\\.)?acg18\\\.us\\\/go\\\/\\\?url=','']]]);
530536
break;
537+
case "htai":
538+
contentArea="div.post_content";
539+
commArea='commentlist';
540+
break;
531541
}
532542
}
533543

0 commit comments

Comments
 (0)