Query results for : jQuery
Remove Welcome pages with Greasemonkey- 27 March 2015 - (0) Comments
Thomas Hampel
27 March 2015If you are like me trying to delete all cookies and all cached elements with every browser restart, annoying banners or welcome pages like this one will show up every time you log in.
I am taking eBay as an example here but of course the same concept applies to other sites.
Firefox users can use a small Greasemonkey script to change this once and forall.
all you need to know is what element from the page you need to hide, Firebug is your friend here.
Highlight and click the elment you are interested in and Firebug wll open the respective line of code.
So we now know that the div id pt-tray_0 and/or all elements with class "pt-tray" is what we are looking for.
With some little jQuery the CSS properties of the element can be changed to display style none which will hide the element.
$(".pt-tray").css("display","none")
To make a permanent solution lets wrap it into a Greasemonkey script:
Now just install the latest version of Greasemonkey, restart Firefox and go to Tools\Greasemonkey\Manage User Scripts.
Click New User Script....
define a title and name space.... and add use this small piece of code
// ==UserScript==
// @name eBay NoBanner
// @namespace com.thomashampel.ebay.NoBanner
// @include http://www.ebay.de/*
// @version 1.0
// @grant none
// ==/UserScript==
hideBanner();
window.setTimeout(hideBanner,500);
document.addEventListener("load",hideBanner,true);
function hideBanner(){
$(".pt-tray").css("display","none")
}
// @name eBay NoBanner
// @namespace com.thomashampel.ebay.NoBanner
// @include http://www.ebay.de/*
// @version 1.0
// @grant none
// ==/UserScript==
hideBanner();
window.setTimeout(hideBanner,500);
document.addEventListener("load",hideBanner,true);
function hideBanner(){
$(".pt-tray").css("display","none")
}
Once saved, restart Firefox again to see the result:
Result: