您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
fold items in onliner.by catalog automatically
// ==UserScript== // @name onliner catalog fold feature // @namespace http://tampermonkey.net/ // @version 2025-07-16 // @description fold items in onliner.by catalog automatically // @author vp // @match https://catalog.onliner.by/* // @icon https://gc.onliner.by/favicon.ico // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; const exclude = function(value) { console.log('script is running'); if (!value) { console.log('nothing to exclude, exiting'); return; } const exclusionTerms = value.split(','); document.querySelectorAll('.catalog-form__offers-unit').forEach(function(el) { exclusionTerms.forEach(function(term) { if (el.innerText.includes(term)) { el.style.display = 'none'; } }); }); } const setup = function() { const panel = document.createElement('div'); const label = document.createElement('label'); const input = document.createElement('input'); const button = document.createElement('button'); panel.style.margin = '0 0 25px 5px'; label.innerText = 'Exclude:'; input.id = 'exclusion-terms'; button.innerText = 'OK'; button.onclick = function() { setInterval(exclude, 1000, input.value) }; panel.append(label); panel.append(input); panel.append(button); document.querySelector('.catalog-form__offers').prepend(panel); } setup(); })();