Reddit Remove More From

Removes the "more from subreddit" links that appear on comments pages when you are not signed in

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Reddit Remove More From
// @namespace    reddit_remove_more_from
// @description  Removes the "more from subreddit" links that appear on comments pages when you are not signed in
// @homepageURL  https://github.com/daraeman/reddit_remove_more_from
// @author       daraeman
// @version      1.2
// @date         2017-06-10
// @include      https://www.reddit.com/r/*/comments/*
// ==/UserScript==

(function() {
	var classes = [
		"seo-comments-recommendations",
		"seo-comments",
	];
	var ids = [
		"bottom-comments",
	];
	var children = [];
	classes.forEach( function( classname ){
		children.push( document.getElementsByClassName( classname ) );
	});
	ids.forEach( function( id ){
		children.push( [ document.getElementById( id ) ] );
	});
	for ( var a = 0; a < children.length; a++ ) {
		for ( var b = 0; b < children[ a ].length; b++ ) {
			children[a][b].parentNode.removeChild( children[a][b] );
		}
	}
})();