Don't Read Below the Line

Script intended to reduce misanthropic feelings, by hiding the comments section on some UK newspapers.

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        Don't Read Below the Line
// @namespace   http://xyxyx.org/
// @include     http://www.theguardian.com/*
// @include     https://www.theguardian.com/*
// @include     http://www.dailymail.co.uk/*
// @include     https://www.dailymail.co.uk/*
// @version     0.3
// @grant       none
// @description Script intended to reduce misanthropic feelings, by hiding the comments section on some UK newspapers.
// ==/UserScript==

console.log("Trying to hide comments");

var hideIfFound = function(element) {
	if (!element) {
		console.log("Not found");
	} else {
		console.log("Hiding");
		element.style.visibility = 'hidden';
	}
}

// Gaurdian
hideIfFound(document.getElementById("comments"));
hideIfFound(document.getElementById("top-comments"));
hideIfFound(document.getElementById("d2-root"));

// Daily Mail
hideIfFound(document.getElementById("reader-comments"));