Skip to content

Commit cf81cbc

Browse files
committed
fix
1 parent 60ec3a4 commit cf81cbc

2 files changed

Lines changed: 45 additions & 66 deletions

File tree

HacgGodTurn/HacgGodTurn.user.js

Lines changed: 44 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@
4949
// @include http*://htai.*
5050
// @include http*://gmgard.com/*
5151
// @include http*://*.gmgard.com/*
52-
// @version 3.20.43
52+
// @version 3.20.45
5353
// @grant GM_notification
5454
// @grant GM_xmlhttpRequest
5555
// @run-at document-end
56-
// @require https://greasyfork.org/scripts/23522/code/od.js?version=158958
56+
// @require https://greasyfork.org/scripts/23522/code/od.js?version=159035
5757
// @require https://cdn.jsdelivr.net/crypto-js/3.1.2/components/core-min.js
5858
// @require https://cdn.jsdelivr.net/crypto-js/3.1.2/rollups/aes.js
5959
// @license MIT License
@@ -80,7 +80,9 @@
8080
{
8181
name:"sexacg",
8282
url:"https://sexacg.com/",
83-
regex:/sexacg\./
83+
regex:/sexacg\./,
84+
contentArea:'article',
85+
commArea:'su-quote-inner'
8486
},
8587
{
8688
name:"acglover",
@@ -92,42 +94,48 @@
9294
name:"acgtf",
9395
url:"https://www.acg.tf/",
9496
regex:/acg\.tf/,
95-
offset:50
97+
offset:50,
98+
articleSel:"div.dt-news-post"
9699
},
97100
{
98101
name:"tianshit",
99102
url:"https://www.tianshit.com/",
100-
regex:/tianshit\./
103+
regex:/tianshit\./,
104+
contentArea:'.article-content'
101105
},
102106
{
103107
name:"acggj",
104108
url:"https://www.acggj.com/",
105109
regex:/www\.(acggj|acg44)\./,
106110
hideOd:true,
107111
bbs:/bbs\.acggj\./,
108-
offset:55
112+
offset:55,
113+
articleSel:"section.card"
109114
},
110115
{
111116
name:"acg12",
112117
url:"https://acg12.com/",
113118
regex:/acg12\./,
114119
hideOd:true,
115120
downloadUrl:/acg12\.com\/download/,
116-
offset:55
121+
offset:55,
122+
articleSel:"section.card"
117123
},
118124
{
119125
name:"acg15",
120126
url:"http://www.acg15.com/",
121127
regex:/acg15\.com/,
122128
hideOd:true,
123-
offset:55
129+
offset:55,
130+
articleSel:"section.card"
124131
},
125132
{
126133
name:"lifan",
127134
url:"http://lifanmoe.com/",
128135
regex:/lifanmoe\./,
129136
downloadUrl:/lifanmoe\.com\/download/,
130-
offset:55
137+
offset:55,
138+
articleSel:"section.card"
131139
},
132140
{
133141
name:"idanmu",
@@ -140,7 +148,8 @@
140148
url:"https://www.sijihuisuo.club/",
141149
regex:/sijihuisuo\.club/,
142150
innerPage:/sijihuisuo\.club\/(sj\/\d|\?p=\d)/,
143-
offset:115
151+
offset:115,
152+
contentArea:".ds-comments"
144153
},
145154
{
146155
name:"acg18",
@@ -159,15 +168,17 @@
159168
name:"galacg",
160169
url:"http://www.galacg.me/",
161170
regex:/galacg\./,
162-
hideOd:true
171+
hideOd:true,
172+
articleSel:"div.article"
163173
},
164174
{
165175
name:"mhecy",
166176
url:"http://www.mhecy.com/",
167177
regex:/mhecy\./,
168178
downloadUrl:/www\.mhecy\.com\/\?page_id=\d+/,
169179
hideOd:true,
170-
offset:55
180+
offset:55,
181+
articleSel:"section.card"
171182
},
172183
{
173184
name:"oomoe",
@@ -179,58 +190,69 @@
179190
{
180191
name:"acgzone",
181192
url:"http://www.uraban.me/",
182-
regex:/acgzone\.org|uraban\.me/
193+
regex:/acgzone\.org|uraban\.me/,
194+
contentArea:'article'
183195
},
184196
{
185197
name:"acgmoon",
186198
url:"https://acgmoon.org/",
187199
regex:/acgmoon\.(org|com)/,
188-
offset:50
200+
offset:50,
201+
contentArea:"div.post-content"
189202
},
190203
{
191204
name:"moe-acg",
192205
url:"https://www.moe-acg.cc/",
193206
regex:/moe-acg\./,
194207
offset:55,
195208
hideOd:true,
196-
downloadUrl:/moe-acg\.cc\/download/
209+
downloadUrl:/moe-acg\.cc\/download/,
210+
articleSel:"section.card"
197211
},
198212
{
199213
name:"htai",
200214
url:"http://htai.co/",
201-
regex:/htai\.(co|me)/
215+
regex:/htai\.(co|me)/,
216+
contentArea:"div.post_content",
217+
commArea:'commentlist'
202218
},
203219
{
204220
name:"gmgard",
205221
url:"https://gmgard.com/",
206-
regex:/gmgard\.com/
222+
regex:/gmgard\.com/,
223+
articleSel:"div.post"
207224
},
208225
{
209226
name:"mygalgame",
210227
url:"https://www.mygalgame.com/",
211-
regex:/mygalgame\.com/
228+
regex:/mygalgame\.com/,
229+
articleSel:".article",
230+
commArea:'commentlist'
212231
},
213232
{
214233
name:"acgnz",
215234
url:"http://www.acgnz.cc/",
216235
regex:/acgnz\.cc/,
217236
hideOd:true,
218237
offset:55,
219-
downloadUrl:/acgnz\.cc\/download/
238+
downloadUrl:/acgnz\.cc\/download/,
239+
articleSel:"section.card"
220240
},
221241
{
222242
name:"moxacg",
223243
url:"http://www.moxacg.com/",
224244
regex:/moxacg\./,
225245
hideOd:true,
226-
offset:55
246+
offset:55,
247+
articleSel:"section.card"
227248
},
228249
{
229250
name:"nacg",
230251
url:"http://nacg.me/",
231252
regex:/nacg\.me/,
232253
hideOd:true,
233-
offset:65
254+
offset:65,
255+
contentArea:'.content'
234256
}
235257
],
236258
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$/,
@@ -249,9 +271,7 @@
249271
}
250272

251273
var t, curSite, curArticle;
252-
var contentArea='.entry-content', commArea="comment-content";
253274
var originTitile = document.title;
254-
var articleSel="article";
255275
var isHttps=location.protocol=="https:";
256276
if(isHttps){
257277
var refMeta = document.createElement('meta');
@@ -269,6 +289,7 @@
269289
break;
270290
}
271291
}
292+
var contentArea=curSite&&curSite.contentArea?curSite.contentArea:'.entry-content', commArea=curSite&&curSite.commArea?curSite.commArea:"comment-content",articleSel=curSite&&curSite.articleSel?curSite.articleSel:"article";
272293

273294
if(/\.baidu\./.test(location.href)){
274295
if(location.hash.slice(1)){
@@ -281,7 +302,6 @@
281302
}else if(curSite){
282303
switch(curSite.name){
283304
case "acgtf":
284-
articleSel="div.dt-news-post";
285305
var content=document.querySelector('.entry-content');
286306
if(content){
287307
var plist = content.querySelectorAll("p");
@@ -338,13 +358,11 @@
338358
createBlockBtn();
339359
break;
340360
case "acg12":
341-
articleSel="section.card";
342361
if(isHttps)
343362
addInsertHandler([["a","img","link","script"],[['p:(\\\/\\\/|\\\\\\/\\\\\\/)(www\\\.|static\\\.)?acg12','ps:$1$2acg12']]]);
344363
break;
345364
case "sijihuisuo":
346365
if(curSite.innerPage.test(location.href)){
347-
contentArea=".ds-comments";
348366
t=window.setInterval(function(){
349367
if(document.querySelector(".ds-comments")){
350368
clearInterval(t);
@@ -392,22 +410,10 @@
392410
}
393411
if(isHttps)changeUrl(true,[["a","iframe"],[['http:','https:']]]);
394412
break;
395-
case "sexacg":
396-
contentArea='article';
397-
commArea='su-quote-inner';
398-
break;
399413
case "moxacg":
400-
articleSel="section.card";
401414
if(isHttps)addInsertHandler([["body","a","img","link","script"],[['p:(\\\/\\\/|\\\\\\/\\\\\\/)(www\\\.)?moxacg','ps:$1$2moxacg']]]);
402415
break;
403-
case "lifan":
404-
articleSel="section.card";
405-
break;
406-
case "moe-acg":
407-
articleSel="section.card";
408-
break;
409416
case "acggj":
410-
articleSel="section.card";
411417
if(isHttps){
412418
changeUrl(true,[["a","img","script","link"],[['p:(\\\/\\\/|\\\\\\/\\\\\\/)(www\\\.|bbs\\\.)?acggj','ps:$1$2acggj']]]);
413419
var baseUrl=document.querySelector('base');
@@ -421,15 +427,8 @@
421427
}*/
422428
break;
423429
case "acgnz":
424-
articleSel="section.card";
425430
if(isHttps)addInsertHandler([["a","img","link","script"],[['p:(\\\/\\\/|\\\\\\/\\\\\\/)(www\\\.)?acgnz','ps:$1$2acgnz']]]);
426431
break;
427-
case "nacg":
428-
contentArea='.content';
429-
break;
430-
case "tianshit":
431-
contentArea='.article-content';
432-
break;
433432
case "acglover":
434433
changeUrl(true,[["a","img"],[['acglover\\\.net','acglover\\\.top']]]);
435434
break;
@@ -497,11 +496,7 @@
497496
}
498497
}
499498
break;
500-
case "galacg":
501-
articleSel="div.article";
502-
break;
503499
case "acgmoon":
504-
contentArea="div.post-content";
505500
var postContent=document.querySelector("div.post-content");
506501
if(postContent && postContent.classList.contains("hexie")){
507502
var hexieBtn=document.createElement("button");
@@ -529,25 +524,10 @@
529524
}
530525
}
531526
break;
532-
case "acg15":
533-
articleSel="section.card";
534-
break;
535-
case "acgzone":
536-
contentArea='article';
537-
break;
538-
case "mhecy":
539-
articleSel="section.card";
540-
break;
541527
case "acg18":
542528
changeUrl(true,[["a"],[['https?:\\\/\\\/[^\\\.]*(\\\.)?acg18\\\.us\\\/go\\\/\\\?url=','']]]);
543529
break;
544-
case "htai":
545-
contentArea="div.post_content";
546-
commArea='commentlist';
547-
break;
548530
case "mygalgame":
549-
commArea='commentlist';
550-
articleSel=".article";
551531
var downBtn=document.querySelector("a.hint--right");
552532
if(downBtn){
553533
var innBtn=downBtn.querySelector(".btn-danger");
@@ -577,7 +557,6 @@
577557
break;
578558
case "gmgard":
579559
if(isHttps)addInsertHandler([["img"],[['p(:\\\/\\\/static\.gmgard\.com)','ps$1']]]);
580-
articleSel="div.post";
581560
curSite.preRocket=function(){unsafeWindow.$('#dllist a').mouseenter();};
582561
break;
583562
}

0 commit comments

Comments
 (0)