您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Eliminates Huffington Post Entries from Yahoo News list. Will run through iterative cycles to continue cleaning up the page as more are loaded. Based on original code by Edward.
当前为
// ==UserScript== // @name Purge Huffington Post from Yahoo News feed - 2020 // @version 1.0 // @namespace ezChx // @author ezChx // @description Eliminates Huffington Post Entries from Yahoo News list. Will run through iterative cycles to continue cleaning up the page as more are loaded. Based on original code by Edward. // @include http*://*.yahoo.*/* // @grant unsafeWindow // ==/UserScript== setInterval(removeSpam, 2000); function removeSpam() { var spanTags = document.querySelectorAll("[data-publisher-id='the_huffington_post_584']"); var found; for (var i = 0; i < spanTags.length; i++) { found = spanTags[i]; var parentBlock = getParent(getParent(getParent(getParent(found)))); removeAllChildren(parentBlock); } } function getParent(o) { return o.parentNode; } function contains(a, obj) { var i = a.length; while (i--) { if (a[i] === obj) { return true; } } return false; } function removeAllChildren(o) { while (o.firstChild) { o.removeChild(o.firstChild); } }