Last active
April 24, 2024 06:23
-
-
Save tyhallcsu/a2ff3da87a83429f38a7059bcd099df6 to your computer and use it in GitHub Desktop.
This Tampermonkey script enhances your navigation on RARBG by automatically highlighting torrent rows with high seeder counts. It cleverly identifies the specific column labeled 'Seeders' within the torrent table—regardless of its position due to site updates or changes. By dynamically spotlighting these rows, the script makes it significantly e…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name RARBG Torrents - Dynamic Column Highlighting v5 | |
// @namespace tampermonkey | |
// @version 5.0 | |
// @description This Tampermonkey script enhances your navigation on RARBG by automatically highlighting torrent rows with high seeder counts. It cleverly identifies the specific column labeled 'Seeders' within the torrent table—regardless of its position due to site updates or changes. By dynamically spotlighting these rows, the script makes it significantly easier for users to quickly spot the most popular and well-seeded torrents. This feature is particularly useful for distinguishing between torrents at a glance, thereby improving the efficiency of selecting high-quality downloads. | |
// https://greasyfork.org/en/scripts/493324-rarbg-torrents-dynamic-column-highlighting-v5 | |
// @license MIT | |
// @downloadURL https://update.greasyfork.org/scripts/493324/RARBG%20Torrents%20-%20Dynamic%20Column%20Highlighting%20v5.user.js | |
// @updateURL https://update.greasyfork.org/scripts/493324/RARBG%20Torrents%20-%20Dynamic%20Column%20Highlighting%20v5.meta.js | |
// @author sharmanhall | |
// @match https://rarbg.to/torrents.php* | |
// @match https://rarbg.to/torrents.php* | |
// @match https://rarbg.to/torrents.php* | |
// @include https://rarbgprx.org/torrents.php* | |
// @include https://proxyrarbg.org/torrents.php* | |
// @include https://rarbgunblocked.org/torrents.php* | |
// @include https://rarbgaccess.org/torrents.php* | |
// @include https://rarbgaccessed.org/torrents.php* | |
// @include https://rarbgcore.org/torrents.php* | |
// @include https://rarbgdata.org/torrents.php* | |
// @include https://rarbgenter.org/torrents.php* | |
// @include https://rarbgget.org/torrents.php* | |
// @include https://rarbggo.org/torrents.php* | |
// @include https://rarbgindex.org/torrents.php* | |
// @include https://rarbgmirror.org/torrents.php* | |
// @include https://rarbgmirrored.org/torrents.php* | |
// @include https://rarbgp2p.org/torrents.php* | |
// @include https://rarbgproxied.org/torrents.php* | |
// @include https://rarbgproxies.org/torrents.php* | |
// @include https://rarbgproxy.org/torrents.php* | |
// @include https://rarbgto.org/torrents.php* | |
// @include https://rarbgtor.org/torrents.php* | |
// @include https://rarbgtorrents.org/torrents.php* | |
// @include https://rarbgunblock.org/torrents.php* | |
// @include https://rarbgway.org/torrents.php* | |
// @include https://rarbgweb.org/torrents.php* | |
// @include https://unblockedrarbg.org/torrents.php* | |
// @include https://rarbg2018.org/torrents.php* | |
// @include https://rarbg2019.org/torrents.php* | |
// @include https://rarbg2020.org/torrents.php* | |
// @include https://rarbg2021.org/torrents.php* | |
// @include https://*rarbg.* | |
// @include /https?:\/\/.{0,8}rarbg.*\.\/*/ | |
// @include /https?:\/\/.{0,8}rargb.*\.\/*/ | |
// @include https://*rarbg.* | |
// @include /https?:\/\/.{0,8}rarbg.*\.\/*/ | |
// @include /https?:\/\/.{0,8}rargb.*\.\/*/ | |
// @include /https?:\/\/.*u=MTcyLjIxLjAuMXw6Ly9yYXJiZy50by90b3JyZW50LzIyMDg3MjYwfE1vemlsbGEvNS4wIChXaW5kb3dzIE5UIDEwLjA7IFdpbjY0OyB4NjQpIEFwcGxlV2ViS2l0LzUzNy4zNiAoS0hUTUwsIGxpa2UgR2Vja28pIENocm9tZS83OS4wLjM5NDUuMTMwIFNhZmFyaS81MzcuMzZ8ODc4MDQz.*/ | |
// @include https://www.rarbg.is | |
// @include https://proxyrarbg.org | |
// @include https://rarbg.com | |
// @include https://rarbg.to | |
// @include https://rarbg2018.org | |
// @include https://rarbg2019.org | |
// @include https://rarbg2020.org | |
// @include https://rarbg2021.org | |
// @include https://rarbgaccess.org | |
// @include https://rarbgaccessed.org | |
// @include https://rarbgcdn.org | |
// @include https://rarbgcore.org | |
// @include https://rarbgdata.org | |
// @include https://rarbgenter.org | |
// @include https://rarbgget.org | |
// @include https://rarbggo.org | |
// @include https://rarbgindex.org | |
// @include https://rarbgmirror.com | |
// @include https://rarbgmirror.org | |
// @include https://rarbgmirrored.org | |
// @include https://rarbgp2p.org | |
// @include https://rarbgproxied.org | |
// @include https://rarbgproxies.org | |
// @include https://rarbgproxy.com | |
// @include https://rarbgproxy.org | |
// @include https://rarbgprx.org | |
// @include https://rarbgto.org | |
// @include https://rarbgtor.org | |
// @include https://rarbgtorrents.org | |
// @include https://rarbgunblock.com | |
// @include https://rarbgunblock.org | |
// @include https://rarbgunblocked.org | |
// @include https://rarbgway.org | |
// @include https://rarbgweb.org | |
// @include https://unblockedrarbg.org | |
// @include https://www.rarbg.is | |
// @icon https://t1.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=http://rarbg.to&size=16 | |
// @grant none | |
// @license MIT | |
// @downloadURL https://update.greasyfork.org/scripts/493324/RARBG%20Torrents%20-%20Dynamic%20Column%20Highlighting%20v5.user.js | |
// @updateURL https://update.greasyfork.org/scripts/493324/RARBG%20Torrents%20-%20Dynamic%20Column%20Highlighting%20v5.meta.js | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
function findSeederColumnIndex() { | |
// Find the 'a' tag with 'href' containing "seeders" | |
//var seederLink = document.querySelector('a[href*="seeders"]'); | |
var seederLink = document.querySelector('.lista2t a[href*="seeders"]:not(#pager_links a)'); | |
console.log("seederLink" + seederLink); | |
if (!seederLink) { | |
console.log("Seeder link not found"); | |
return -1; | |
} | |
// Find the parent 'td' of the 'a' tag | |
var seederTd = seederLink.parentElement; | |
while (seederTd.tagName !== 'TD' && seederTd != null) { | |
seederTd = seederTd.parentElement; | |
} | |
if (!seederTd) { | |
console.log("Seeder TD not found"); | |
return -1; | |
} | |
// Count the number of preceding 'td' elements to find the index | |
var index = 0; | |
while ((seederTd = seederTd.previousElementSibling) != null) { | |
index++; | |
} | |
console.log("Seeder Column Index Found: " + index); | |
return index; | |
} | |
function getHighlightColor(seederCount) { | |
if (seederCount >= 1000) return "#c0edc8"; // Very light green | |
if (seederCount >= 900) return "#c0edc8"; // Slightly darker | |
if (seederCount >= 800) return "#c0edc8"; // Gradually getting darker | |
if (seederCount >= 700) return "#c0edc8"; // Still light, but more green | |
if (seederCount >= 600) return "#c0edc8"; // Green with a hint of blue | |
if (seederCount >= 500) return "#c0edc8"; // Light green-blue | |
if (seederCount >= 400) return "#c0edc8"; // Even lighter green-blue | |
if (seederCount >= 300) return "#c0edc8"; // Very pale green | |
if (seederCount >= 200) return "#c0edc8"; // Nearing very light green | |
return "#C0EDC8"; // Almost white with a hint of green | |
} | |
function highlightTorrents() { | |
console.log("Running highlightTorrents"); | |
var seederColumnIndex = findSeederColumnIndex(); | |
if (seederColumnIndex === -1) { | |
console.error("Seeder column not found"); | |
return; | |
} | |
var rows = document.querySelectorAll(".lista2t > tbody > tr.lista2"); | |
console.log("Total Rows Found: " + rows.length); | |
var countHighlighted = 0; | |
rows.forEach(function(row, rowIndex) { | |
var sValueText = row.cells[seederColumnIndex].textContent.trim(); | |
console.log("Row " + rowIndex + " Seeder Value: " + sValueText); | |
var sValue = parseInt(sValueText, 10); | |
if (!isNaN(sValue) && sValue >= 100) { | |
var highlightColor = getHighlightColor(sValue); | |
row.style.background = highlightColor; // Highlight based on seeder count | |
countHighlighted++; | |
} | |
}); | |
console.log(countHighlighted + " rows highlighted"); | |
} | |
// Initial highlighting | |
highlightTorrents(); | |
// Re-apply highlighting every second | |
setInterval(highlightTorrents, 1000); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Dynamic Seeder Highlight for RARBG Torrents
Enhance your browsing experience on RARBG with this Tampermonkey script that dynamically highlights torrent rows based on seeder counts. This script is specifically designed to focus on the 'Seeders' column, identifying torrents with a high number of seeders and applying a visual highlight to those rows, making it easier to spot popular torrents.
Features
Usage
Simply install the script, and visit any supported RARBG proxy or main site. The script runs automatically, adjusting the visual presentation of torrent listings by highlighting those with high seeder counts.
Supported URLs
This script is perfect for regular RARBG users who want to quickly identify highly seeded torrents without manually scanning the entire list.
Installation
Install this script via Tampermonkey on your browser, and it will automatically activate when you navigate to any supported RARBG page.
Customization
To customize the highlight colors based on your preferences or to create a gradient effect, modify the
getHighlightColor
function in the script. Here is the default function:To introduce a gradient effect, you could adjust the function as follows:
Feedback
Feel free to share your suggestions or improvements for this script. Happy downloading!