Archive for the ‘remove unwanted elements’ tag
Bookmarklets
I’d heard of bookmarklets, but never bothered to look into what they were. Life is full of complexities; there isn’t time to understand everything. Then I realized what a simple, wonderful tool I was missing:
Bookmarklets can be used run to client-side arbitrary javascript on any arbitrary page you want. Reformat, remove, extract, transform, you name it…
Animation? I’m Trying to Read Here!
Personally, I can’t stand animations and video when I am trying to read an article. They distract me. I mean completely. I can’t read the article. It drives me crazy when I am trying to read an article with content I’m legitimately interested in and a video is flashing on the side of the screen.
My usual solutions are the embarassingly un-technical approaches of either moving the sidebar ad off-screen or refreshing the page hoping to it will fresh to a static ad. If that fails, out comes Chrome Element inspector to remove the offending element.
In general, I do understand the need for ads on websites so I’m not really looking for full ad blocking software. However, I do wish for the times it’s really driving me crazy that I could automate the process of making distracting animations go away.
IFRAMES be Gone!
Introducing “Remove IFRAMES” an immensely simple bookmarklet that took about 12 seconds to author that removes all iframe elements from a page with the click of a button. Annoying video ads on a page? Most likely they’re embedded in iframes. Click of a button, they are gone. Back to reading the actual content of the article.
Create a new bookmark, add the code below as the link URL, go to a page with iframes, click on the bookmark…and voila!
javascript:(function(){var a=document.getElementsByTagName('iframe');for(var i=0;i<a.length;++i){a[i].setAttribute('src','');}})()
Or simply create a bookmark to this link: bookmarklet
Sure, it doesn’t solve my whole I-want-nothing-animated-on-this-page problem, but it illustrates the idea of how wonderfully simple and useful bookmarklets are.
Readable
A much better example would likely be Readable, a simple bookmarklet that reformats a page to be – you guessed it – more readable. Brilliant. Simple. Brilliant because it is so simple.
Also worth noting, if you look at the bookmarklet source for Readable is the fact that it essentially stores the options in the bookmarklet itself, but store the crux of the script in a proper script file hosted elsewhere (so you don’t have to cram all the source into the bookmarklet url text itself).
Needless to say, it was Readable that clued me in that bookmarklets are actually a potentially wonderful tool for customizing web browsing to the way I like it. It’s exactly the kind of mini-extension without having to write a full extension that I’ve been looking for!
I’m sure this is all elementary to someone who has come across bookmarklets before, but for me, this was the introduction!
