您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
This script helps you to filter out the news that you don't want to see. This example works for watson.ch (popular swiss newssite)
当前为
// ==UserScript== // @name Remove unwanted news // @version 1.1 // @grant none // @namespace news_filtering // @description This script helps you to filter out the news that you don't want to see. This example works for watson.ch (popular swiss newssite) // @license MIT // @include https://www.watson.ch/* // @require https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js // ==/UserScript== //https://gist.github.com/BrockA/2625891 function recurseEl(father,element) { if(element.childElementCount === 0) { search = /(ukraine)|(selenskyj)|(liveticker)|(influencer)|(fifa)|(messi)|(infantino)|(corona)|(putin)|(bolsonaro)|(trump)|(trumps)|(arabischen)|(arabisch)|(jong)|(musk)|(promis)|(promi)|(katar)|(boateng)|(russland)|(russen)|(nati)|(weltmeister)/ if (element.innerText.toLowerCase().match(search)){ console.log("removing" + element.innerText) element.textContent = ''; father.style.display = "none"; } } else { Array.from(element.children).forEach(child => { recurseEl(father,child); }); } } function updateHTML() { $('.region').each(function(i, obj) { try { recurseEl(obj,obj); } catch (error) { console.error(error); } }); }; var intervalId = window.setInterval(function(){ updateHTML(); }, 2000);