Greasy Fork

Greasy Fork is available in English.

Hide gsw_hoops and underdog from Warriorsworld Politics

Improve the quality of your life and save time by hiding all posts written by unwanted posters on warriorsworld.net.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Hide gsw_hoops and underdog from Warriorsworld Politics
// @namespace    hide_gsw_hoops_and_underdog
// @include      http://forums.warriorsworld.net/politics/*
// @include      https://forums.warriorsworld.net/politics/*
// @author       Originally designed by Jim Barnett (The fake one). Modified by Retired Season Ticket Holder  11-19-15.
// @description  Improve the quality of your life and save time by hiding all posts written by unwanted posters on warriorsworld.net.
// @version 0.0.1.20151130012713
// ==/UserScript==

// a function that loads jQuery and calls a callback function when jQuery has finished loading
function addJQuery(callback) {
  var script = document.createElement("script");
  script.setAttribute("src", "http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.2.min.js");
  script.addEventListener('load', function() {
    var script = document.createElement("script");
    script.textContent = "(" + callback.toString() + ")();";
    document.body.appendChild(script);
  }, false);
  document.body.appendChild(script);
}

// the guts of this userscript
function main() {
  
	var e = $('span:contains(gsw_hoops)');
        var e2 = $('span:contains(underdog)');
        $.merge( e, e2 ); 



	var li = e.closest('div.msg').parent('li').remove();

	var post = $('a:contains(Post New Thread)');

	if (post != null){
		var message = 'You have been saved from <span style="font-weight: bold;">' + e.length + '</span> annoying posts';
		post_parent = post.closest('a.blue');
		post_parent.after('<br><span>' + message + '</span>');
	}
   

}

// load jQuery and execute the main function
addJQuery(main);