// ==UserScript== // @name 咸鱼 - 简单的屏蔽关键词 // @namespace https://time-blog.top/ // @version 2025-04-02 // @description 用于屏蔽其他无关内容。 // @author Time - https://time-blog.top // @homepage https://time-blog.top // @match https://www.goofish.com/search?q=n1s%204k&spm=a21ybx.home.searchInput.0 // @icon https://www.google.com/s2/favicons?sz=64&domain=goofish.com // @grant none // @downloadURL none // ==/UserScript== (function() { 'use strict'; // Your code here... window.addEventListener('load', function() { document.querySelector("#content > div:nth-child(1) > div:nth-child(2)").innerHTML += '
' setTimeout(()=>{ var text_input = document.getElementById("input_content"); var button = document.getElementById("yes_button"); button.addEventListener('click' , ()=>{ var item_lis = document.querySelectorAll("#content > div:nth-child(1) > div:nth-child(3) > a"); if (text_input.value != ""){ for (let index = 0; index < item_lis.length; index++){ let text = item_lis[index].children[1].children[0].textContent.toLocaleLowerCase() let value_text = text_input.value if (text.includes(value_text.toLocaleLowerCase())){ item_lis[index].style.display = "none"; } } } }) },1000) }) })();