Don't Read Below the Line

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

Version vom 14.01.2017. Aktuellste Version

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

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

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

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

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

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

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.

(I already have a user style manager, let me install it!)

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