-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathops-red-fix-pl.js
29 lines (27 loc) · 1.27 KB
/
ops-red-fix-pl.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// ==UserScript==
// @name OPS-RED: Fix PL
// @namespace github.com/euamotubaina
// @version 2024-12-19_01
// @description Fix PL links
// @author euamotubaina
// @grant none
// @match https://orpheus.network/torrents.php*
// @match https://orpheus.network/artist.php?id=*
// @match https://orpheus.network/collages.php*
// @match https://redacted.sh/torrents.php*
// @match https://redacted.sh/artist.php?id=*
// @match https://redacted.sh/collages.php*
// @downloadURL https://raw.githubusercontent.com/euamotubaina/userscripts/main/ops-red-fix-pl.js
// @updateURL https://raw.githubusercontent.com/euamotubaina/userscripts/main/ops-red-fix-pl.js
// ==/UserScript==
(() => {
'use strict';
Array.from(document.querySelectorAll('.torrent_row.group_torrent a[href^="torrents.php?id="]'))
.forEach(pl => {
if (pl.textContent === 'PL') pl.classList.remove("group_snatched", "gazelle_snatched", "gazelle_uploaded", "gazelle_leeching", "gazelle_seeding");
const m = pl.href.match(/id=\d+&torrentid=(\d+)(?:(#torrent\d+|.*?))$/);
if (m) {
pl.href = `torrents.php?torrentid=${m[1]}`;
}
});
})();