您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Removes items from the categories listed. Edit the list for what you want hidden (prefixing any ' with \), but back it up, as it will get overwritten at the next update
当前为
// ==UserScript== // @name Facebook Marketplace: Hide Unwanted Categories // @description Removes items from the categories listed. Edit the list for what you want hidden (prefixing any ' with \), but back it up, as it will get overwritten at the next update // @match https://www.facebook.com/* // @version 0.5 // @author mica // @namespace greasyfork.org/users/12559 // @license MIT // ==/UserScript== var list = [ 'Auto Parts', 'Baby & Kids Items', 'Books, Movies & Music', 'Mobile phones', 'Home Sales', 'Jewelry & Accessories', 'Kids\' Clothing', 'Property Rentals', 'Women\'s', 'Women\'s clothing & shoes' ];// ^ no comma for the last one! function filter() { if (location.pathname.includes('marketplace') && !location.pathname.match(/category|profile|you|notifications|inbox/g)) { document.querySelectorAll('[aria-label="Collection of Marketplace items"] span[dir]:not(.catChecked)').forEach((element) => { if (list.includes(element.innerText)) { element.closest('div[class=""]').remove(); } element.classList.add('catChecked') }); } } var observer = new MutationObserver(filter); observer.observe(document.documentElement, { subtree: true, childList: true });