// ==UserScript==
// @name RARBG Helper
// @name:zh-CN RARBG 助手
// @author PeratX
// @connect *
// @description Powerful Toolbox for RARBG
// @description:zh-cn 为 RARBG 定制的强力工具箱
// @grant GM_xmlhttpRequest
// @license Apache License 2.0
// @match *://rarbg.to/*
// @match *://rarbg2018.org/*
// @match *://rarbg2019.org/*
// @match *://rarbg2020.org/*
// @match *://rarbg2021.org/*
// @match *://rarbgaccess.org/*
// @match *://rarbgaccessed.org/*
// @match *://rarbgcdn.org/*
// @match *://rarbgcore.org/*
// @match *://rarbgdata.org/*
// @match *://rarbgenter.org/*
// @match *://rarbgget.org/*
// @match *://rarbggo.org/*
// @match *://rarbgindex.org/*
// @match *://rarbgmirror.org/*
// @match *://rarbgmirrored.org/*
// @match *://rarbgp2p.org/*
// @match *://rarbgproxied.org/*
// @match *://rarbgproxies.org/*
// @match *://rarbgproxy.org/*
// @match *://rarbgprx.org/*
// @match *://rarbgto.org/*
// @match *://rarbgtor.org/*
// @match *://rarbgtorrents.org/*
// @match *://rarbgunblock.org/*
// @match *://rarbgunblocked.org/*
// @match *://rarbgway.org/*
// @match *://rarbgweb.org/*
// @match *://proxyrarbg.org/*
// @match *://unblockedrarbg.org/*
// @match *://rarbg.com/*
// @match *://rarbgmirror.com/*
// @match *://rarbgproxy.com/*
// @match *://rarbgunblock.com/*
// @namespace https://peratx.net
// @supportURL https://github.com/PeratX/RARBGHelper
// @version 1.7.5
// @downloadURL none
// ==/UserScript==
(async () => {
"use strict";
const settings = {
downloadImg: '',
loadInfoOnHover: (typeof localStorage.getItem("loadInfoOnHover") === 'string' ? !!localStorage.getItem("loadInfoOnHover") : true),
localStorageMaxEntries: 1000,
magnetImg: '
',
modifications: [
{
ref: '#description img[src*="22pixx.xyz/os/"], #description img[src*="22pixx.xyz/rs/"], #description img[src*="22pixx.xyz/s/"]',
handler(img) {
img.src = img.src.replace(new RegExp(/\.xyz\/os\//), ".xyz/o/");
img.src = img.src.replace(new RegExp(/\.xyz\/rs\//), ".xyz/r/");
img.src = img.src.replace(new RegExp(/\.xyz\/s\//), ".xyz/i/");
img.style.maxWidth = "unset";
img.style.width = "100%";
},
},
{
ref: '#description img[src*="imagecurl.com/images/"]',
handler(img) {
img.src = img.src.replace(new RegExp(/_thumb\./), ".");
img.style.maxWidth = "unset";
img.style.width = "100%";
},
},
{
ref: '#description img[src*="freebunker.com/tn/t"], #description img[src*="imgcarry.com/tn/t"], #description img[src*="imgshots.com/tn/t"], #description img[src*="imagesnake.com/tn/t"], #description img[src*="pornbus.org/tn/t"]',
handler(img) {
img.src = img.src.replace(new RegExp(/\/tn\/t/), "tn/i");
img.style.maxWidth = "unset";
img.style.width = "100%";
},
},
{
ref: '#description img[src*="imgprime.com/uploads/"]',
handler(img) {
img.src = img.src.replace(new RegExp(/\/small\//), "/big/");
img.style.maxWidth = "unset";
img.style.width = "100%";
},
},
],
options: `