Skip to content

Commit b805f01

Browse files
committed
Update randomSexyPic.user.js
1 parent 7ae5449 commit b805f01

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

RandomSexyPic/randomSexyPic.user.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// @name:zh-TW 軟瑟盤
55
// @name:ja RandomSexyPicParser
66
// @namespace hoothin
7-
// @version 1.3.12
7+
// @version 1.3.13
88
// @description Random Sexy Pictures Parser
99
// @description:zh-CN 随机色图
1010
// @description:zh-TW 隨機色圖
@@ -35,6 +35,7 @@
3535
'use strict';
3636
var setuConfig={
3737
"api.lolicon.app":{
38+
include: /setu\/v2/i,
3839
name:"Lolicon ACG SexyPic",
3940
url:"https://api.lolicon.app/setu/v2?r18=1&num=5",
4041
luckyUrl:["https://api.lolicon.app/setu/v2?r18=0&num=5",
@@ -80,6 +81,7 @@
8081
}
8182
},
8283
"api.nyan.xyz":{
84+
include: /httpapi\/sexphoto/i,
8385
name:"Nyan ACG SexyPic",
8486
url:"https://api.nyan.xyz/httpapi/sexphoto/?r18=true&num=5",
8587
luckyUrl:["https://api.nyan.xyz/httpapi/sexphoto/?r18=true&num=5",
@@ -121,6 +123,7 @@
121123
}
122124
},
123125
"buyersShow":{
126+
include: /api\/(rand|tao|mjx1)/i,
124127
name:"Taobao Buyers Show",
125128
urls:["https://api.uomg.com/api/rand.img3?format=json&num=15",
126129
"https://api.vvhan.com/api/tao?type=json&num=15",
@@ -143,6 +146,7 @@
143146
}
144147
},
145148
"huanmengii.xyz":{
149+
include: /ZY\/aCOS\/cos/i,
146150
name:"Cosplay Show",
147151
url:"https://huanmengii.xyz/ZY/aCOS/cos/?type=json&num=15",
148152
run:()=>{
@@ -171,6 +175,7 @@
171175
}
172176
},
173177
"3650000.xyz":{
178+
include: /\/api\/\?type=json/i,
174179
name:"3650000",
175180
url:"https://3650000.xyz/api/?type=json&mode=7&num=15",
176181
luckyUrl:["https://3650000.xyz/api/?type=json&num=15",
@@ -254,7 +259,7 @@
254259
var curConfig=setuConfig[document.domain],jsonData,hasFloatImg=false,grabed=false,oClient;
255260
if(!curConfig){
256261
GM_registerMenuCommand("Parse current api", customSet);
257-
var customRule=GM_getValue("RSPrules_"+document.domain);
262+
var customRule=GM_getValue("RSPrules_"+document.domain+location.pathname);
258263
if(customRule){
259264
curConfig={run:()=>{
260265
var searchNum=getSearchParam("num");
@@ -317,6 +322,9 @@
317322
}else if(!curConfig.run){
318323
curConfig=setuConfig[curConfig];
319324
}
325+
if(curConfig && curConfig.include && !curConfig.include.test(location.href)){
326+
return;
327+
}
320328
document.title=curConfig.name?curConfig.name:"Random Sexy Pictures";
321329
try{
322330
var firstText = "";
@@ -534,9 +542,9 @@
534542

535543
function customSet(){
536544
if(window.confirm("Parse current api?")){
537-
GM_setValue("RSPrules_"+document.domain, true);
545+
GM_setValue("RSPrules_"+document.domain+location.pathname, true);
538546
}else{
539-
GM_deleteValue("RSPrules_"+document.domain)
547+
GM_deleteValue("RSPrules_"+document.domain+location.pathname)
540548
}
541549
location.reload();
542550
}

0 commit comments

Comments
 (0)