About Me!

This blog is about my musings and thoughts. I hope you find it useful, at most, and entertaining, at least.

Résumé [PDF]

Other Pages

Quotes

Links

Oak Island

Items for Sale

Presence Elsewhere

jim@jimkeener.com

del.icio.us

Twitter

Facebook

LinkedIn

GitHub

BitBucket

Keybase.io

Removing SeattlePi's annoying ads

Date: 2013-04-02
Tags: javascript seattlepi ads

I was doing research on the Seattle Monorail Project (Wikipedia) and found many good articles in SeattlePi. The big problem was that the ads are very obtrusive and they force pagination in javascript. The latter being very annoying; I have a scroll bar, let me use it.

After looking at how they create their print style (which isn’t done via css’s print media), I figure out a nice little piece of Javascript:


jQuery('body').addClass('hst-printable');
jQuery('body').css('text-align', 'center');
jQuery('#text-pages .page').css('display','block !important').css("font-family","Verdana, Geneva, sans-serif !important").css('text-align', 'left');
jQuery('iframe').remove();
jQuery('#meebo').remove();
jQuery('.leaderboard').remove();
jQuery('.leaderboard1').remove();
jQuery('.pm-ad').remove();
hst_pager=true;
jQuery('.hst-galleryitem, .hst-gallerynav, .hst-articlepager, .hst-articlepager-report, .hst-sitefooter, #pluckCommentsContainer, .hst-ysm, .hst-morestories, .hst-art-breadcrumb, .hst-mediumrectangle').hide()

or, as a bookmarklet Rm SeattlePi Ads