Comment Is Hidden

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

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

You will need to install an extension such as Tampermonkey to install this script.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Zateb bir user-style yöneticim var, yükleyeyim!)

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