您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Hide items with class 'products__item' containing specific words on Tavriav
// ==UserScript== // @name Hide alcohol items for Tavriav // @namespace http://tampermonkey.net/ // @version 0.2 // @description Hide items with class 'products__item' containing specific words on Tavriav // @author max5555 // @match https://www.tavriav.ua/catalog/* // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; const wordsToHide = [ "Пиво", "бокал", "вішалка", "кревет", "спред", "коньяк", "горілка", "корм", "свіча", "підг", "вермут", "лікер", "ром", "кавовий", "джин", "віскі", "вино", "бренді", "сидр", "настоянка"].map(word => word.toLowerCase()); function hideItemsBasedOnContent() { const items = document.querySelectorAll('.products__item'); for (let item of items) { let itemContent = item.textContent.toLowerCase(); if (wordsToHide.some(word => itemContent.includes(word))) { item.style.display = 'none'; } } } // Hide items after the page has loaded window.addEventListener('load', hideItemsBasedOnContent); // Also handle any dynamically added items const observer = new MutationObserver(hideItemsBasedOnContent); observer.observe(document.body, { childList: true, subtree: true }); })();