您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
Additional filters. Plentiful code comments include so that you can see what the script is doing block by block. Feel free to use a debugger; statement to step through.
当前为
// ==UserScript== // @name RARBG Filters for Movies and TV Shows [BETA] // @namespace http://tampermonkey.net/ // @version 0.1 // @description Additional filters. Plentiful code comments include so that you can see what the script is doing block by block. Feel free to use a debugger; statement to step through. // @author Kxmode // @match *://rarbg.to/* // @grant none // @require https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js // ==/UserScript== $(document).ready(function() { // TODO: Configuration possibility var showMoviesTVFilters = true; /* TODO: Filter Form [BETA] $("body").prepend("<style data-purpose='additional-styles-min-pricing-tampermonkey-script'>\n" + ".header-huge { height: 280px; }\n" + ".scope-sales .header-title { margin-top: 80px; }\n" + ".fancy-input { position: relative; background: #222; vertical-align: middle; margin: 15px 0 0 19px; padding: 5px 0; }\n" + ".fancy-input input { width: 100px; color: #9fbbcb; border: 1px solid #778c98; border-radius: 2px; background: 0 0; line-height: 16px; -webkit-appearance: none; -moz-appearance: none; appearance: none; font-weight: 400 }\n" + ".fancy-input input::-webkit-input-placeholder { /* Chrome/Opera/Safari * / color: #9fbbcb; }\n" + ".fancy-input input::-moz-placeholder { /* Firefox 19+ * / color: #9fbbcb; } \n" + ".fancy-input input:-ms-input-placeholder { /* IE 10+ * / color: #9fbbcb; } \n" + ".fancy-input input:-moz-placeholder { /* Firefox 18- * / color: #9fbbcb; } \n" + ".fancy-input label { line-height: 24px; color: #9fbbcb; padding-right: 20px; } \n" + ".fancy-input span { margin-top: -4px; color: #fff; background: rgba(60,96,145,.8); border-color: #778c98; line-height: 28px; padding: 0 12px; margin-left: 15px; }\n" + ".fancy-input span:hover { color: #fff; background: #4873a7; border-color: #4873a7; }\n" + "</style>"); $("#js-filters").append("<div class='clearfix'></div><div class='fancy-input text-center'><label>Min USD Filter:</label><input type='text' name='minprice' class='mindata' placeholder='X.XX'><span class='btn btn-sm jQmpFilter'>Update</span></div>"); */ // Iterates through line items $.each($(".lista a"), function(index, value) { var title = $(this).attr("title"); /* * BEGIN: MOVIES AND TV ================================================================================================= */ if (showMoviesTVFilters) { // Skips torrents without titles if (title !== undefined) { // This section hides torrents with IMDB ratings equal to or lower than minRating [TODO: make this a form input filter] var minRating = 6.5; // Loop through every span tag inside the lista class anchor tag $.each($("span"), function(index, value) { var ratings = $(this).text(); var imdb = ratings.indexOf("IMDB: ") + 6; // Continue if this span has IMDB rating information if (ratings !== undefined && imdb !== -1) { var rateValue = parseFloat(ratings.substring(imdb,ratings.length-3)); // Continue if this IMDB rating is a number if (!isNaN(rateValue)) { // Continue if the torrent's rating is equal to or less than the minRating if (rateValue <= minRating) { var target = $(this).parents(".lista2"); target.css( "display", "none" ); target.attr("hidden-by-RARBG-Filters",true); } } } }); // This section hides low-quality KORSUB torrents [TODO: make this a form checkbox filter] if (parseInt(title.indexOf("KORSUB")) > 0) { var target = $(this).parents(".lista2"); target.css( "display", "none" ); target.attr("hidden-by-RARBG-Filters",true); } } } }); /* TODO: Filter counter [ALPHA] $(".container-sales").prepend("<div class='sales-section table-sales' id='min-usd-totals'>\n" + "<div class='pre-table-title' style='font-size: 15px;'>\n" + "<strong>357 products shown\n" + "<span class='pull-right'>135 products hidden</span>\n" + "</strong>\n" + "</div>\n" + "</div>"); */ });