NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name GuitarPlayer Forum Helper // @namespace http://zetsuboutoshio.tk/ // @version 0.4 // @description Удаляет объявления барыг и подсвечивает объявления по фильтрам // @author ZetsubouToshio // @match https://guitarplayer.ru/commerce-instruments/* // @icon https://guitarplayer.ru/favicon.ico // @grant none // @copyright 2018, zetsuboutoshio (https://openuserjs.org/users/zetsuboutoshio) // @license Apache-2.0 // @require http://code.jquery.com/jquery-3.3.1.min.js // ==/UserScript== (function () { 'use strict'; $.expr[":"].contains = $.expr.createPseudo(function (arg) { return function (elem) { return $(elem).text().toUpperCase().indexOf(arg.toUpperCase()) >= 0; }; }); // Your code here... let authors = ["Ladkor", ">>DEAN<<", "KOLOK.ORG", "ЕНК", "igokrut", "GUITAR-SALE.RU", "Guitares.ru", "GreenRV"]; let keywords = ["gibson", "fender", "suhr", "anderson"] let second_wave = ["hamer", "ibanez"] let num = 0; for (let i = 0; i <= authors.length; i++) { let $a = $("tr strong a:contains('" + authors[i] + "')").parents("tr").remove(); num += $a.length; } console.log("Заблокировано " + num + " строк"); $(".stats.windowbg:contains(' 0')").parents("tr").find("td").css("background-color", "#d4f1c5"); for (let i = 0; i <= keywords.length; i++) { $("a:contains('" + keywords[i] + "')").css("color", "red"); } for (let i = 0; i <= second_wave.length; i++) { $("a:contains('" + second_wave[i] + "')").css("color", "orange"); } })();