Skip to content

Commit 2b9d470

Browse files
committed
Update pvcep_rules.js
1 parent b76ffcb commit 2b9d470

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Picviewer CE+/pvcep_rules.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,14 +1043,13 @@ var siteInfo = [
10431043
const re = /^https?:\/\/(?:www\.)?(?:(realbooru\.com|rule34\.xxx))\/index\.php\?page=post&s=view&id=(\d+).*/;
10441044
const m = a.href.match(re);
10451045
if (m) {
1046-
return m[1] == "rule34.xxx" ? `https://api.${m[1]}/index.php?page=dapi&s=post&q=index&id=${m[2]}&json=1` : `https://${m[1]}/index.php?page=dapi&s=post&q=index&id=${m[2]}&json=1`;
1046+
return a.href;
10471047
}
10481048
},
10491049
query: function(html, doc, url) {
10501050
try {
1051-
const o = JSON.parse(html);
1052-
let url = o[0];
1053-
return url.file_url || `https://${location.hostname}/images/${url.directory}/${url.image}`;
1051+
const o = doc.querySelector(".link-list>ul>li>a[href^=http]");
1052+
return o && o.href;
10541053
} catch { }
10551054
}
10561055
}

0 commit comments

Comments
 (0)