LS1GTO

Clean up LS1GTO.com

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==

// @name           LS1GTO

// @namespace      http://geekminute.com/LS1GTO

// @description    Clean up LS1GTO.com

// @include        http://*ls1gto.com/*

// @version 0.0.1.20150610012729
// ==/UserScript==



//Ebay search box

var ebay = document.getElementById('DR-ebay-search-boxCSS');

ebay.parentNode.removeChild(ebay);



var googlesearch = document.getElementById('cse-search-box');

googlesearch.parentNode.removeChild(googlesearch);



//<TABLE bgcolor=#000000 border=1 bordercolor=#cccccc width="100">

var sponsors = document.evaluate("//TABLE[@width='100']", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);

sponsors.snapshotItem(0).parentNode.removeChild(sponsors.snapshotItem(0))

//Hide pay link
var pay = document.evaluate("//a[contains(@href,'payments.php')]", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);

pay.snapshotItem(0).parentNode.removeChild(pay.snapshotItem(0))


//<a rel="nofollow" href="http://www.jdoqocy.com/click-3193633-10521304?URL=http%3A%2F%2Fwww.newegg.com%2FProduct%2FProduct.aspx%3FItem%3DN82E16811129021"
var jdo = document.evaluate("//a[contains(@href,'http://www.jdoqocy.com/click-3193633-10521304')]", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
for (var i = 0; i < jdo.snapshotLength; i++)
{

	jdo.snapshotItem(i).href=unescape(jdo.snapshotItem(i).href.replace('http://www.jdoqocy.com/click-3193633-10521304?URL=', ''));
}

//PostRelease
//author[first-name = "Bob"]
//author[* = "Bob"]
var PostRelease = document.evaluate('//div[span = "PostRelease"]', document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
for (var i = 0; i < PostRelease.snapshotLength; i++)
{

	PostRelease.snapshotItem(i).parentNode.parentNode.parentNode.removeChild(PostRelease.snapshotItem(i).parentNode.parentNode)
}

//Make usernames small again
var ss = document.styleSheets[document.styleSheets.length-1];
if(ss.insertRule) ss.insertRule('.bigusername' + '{' + 'font-size: 11pt;' + '}', ss.cssRules.length);
else if(ss.addRule) ss.addRule(selector, attributes);