您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Remove the Comment Is Free articles (and the whole Opinion section) from the Guardian's front page.
// ==UserScript== // @name Comment Is Hidden // @description:en Remove the Comment Is Free articles (and the whole Opinion section) from the Guardian's front page. // @namespace www.ballpointbanana.com // @include http://www.theguardian.com/uk // @version 1 // @description Remove the Comment Is Free articles (and the whole Opinion section) from the Guardian's front page. // ==/UserScript== // Find the Opinion subsection. var opinion = document.querySelector("section#opinion"); opinion.style = "display:none;" // Find all the "items" on the Guardian. var items = document.querySelectorAll("div.fc-item__container"); // Spin through them and hide all the divs containing a link to commentisfree. for (var ii = 0; ii < items.length; ii++) { var thisdiv = items[ii]; if (thisdiv.querySelector("a").href.indexOf("commentisfree") != -1) { thisdiv.style = "display: none;" } }