Personal Blog of Thomas Hampel - Creative Mythbusting in Development and Collaboration

Who am I?


Previous Document Next Document

Remove Welcome pages with Greasemonkey

Thomas Hampel
 27 March 2015

If 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.

Image:Remove Welcome pages with Greasemonkey

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.
Image:Remove Welcome pages with Greasemonkey
Highlight and click the elment you are interested in and Firebug wll open the respective line of code.
Image:Remove Welcome pages with Greasemonkey
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.

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....
Image:Remove Welcome pages with Greasemonkey
define a title and name space.... and add use this small piece of code
// ==UserScript==
// @name        eBay NoBanner
// @namespace   com.thomashampel.ebay.NoBanner
// @include*
// @version     1.0
// @grant       none
// ==/UserScript==

function hideBanner(){

Once saved, restart Firefox again to see the result:


Image:Remove Welcome pages with Greasemonkey
Tagged with: jQuery Greasemonkey
No Comments Found
Go ElsewhereSubscribe to RSSAboutStay ConnectedAnd More
Thomas Hampel, All rights reserved.