Comment Is Hidden

Remove the Comment Is Free articles (and the whole Opinion section) from the Guardian's front page.

이 스크립트를 설치하려면 Tampermonkey, Greasemonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Userscripts와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 유저 스크립트 관리자 확장 프로그램이 필요합니다.

(이미 유저 스크립트 관리자가 설치되어 있습니다. 설치를 진행합니다!)

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

(이미 유저 스타일 관리자가 설치되어 있습니다. 설치를 진행합니다!)

// ==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;"
    }
}