ftvs

View Background Image in Opera/Google Chrome/Chromium with a bookmarklet

Installation

Create a new bookmark and copy the code into the URL/address section, then save the bookmark. Enable your bookmarks bar and place the bookmarklet on the bookmarks bar for easy access if so desired.
javascript:var backup=document.body.onclick;void(document.body.onclick=function(event){var bodyStyle=window.getComputedStyle(document.body,null).getPropertyValue('background-image');var bgStyle=window.getComputedStyle(event.target,null).getPropertyValue('background-image');if(bgStyle!='none')window.open(bgStyle.replace(/url\("?/,'').replace(/"?\)$/,''));else if(bodyStyle!='none')window.open(bodyStyle.replace(/url\("?/,'').replace(/"?\)$/,''));document.body.onclick=backup;backup=undefined;});

Instructions

Click the bookmarklet then click the image desired. The new image should open in a new tab. Nothing will happen if no image is detected.

Problems

You may get the wrong image, in which case manual methods such as using a different browser (blasphemy)/viewing the HTML/CSS source will be required.

Devs

Script doesn't work on https://developer.mozilla.org/En header, but neither does Firefox's "View background image". Very strange. And there has to be a more elegant way to go about this.

Open pdf/docx/doc/ppt/tiff with Google Docs Viewer from link right-click context menu (Opera/Firefox)

Comments

Unregistered user Wednesday, July 28, 2010 3:08:31 PM

Anonymous writes: Thanks for this. Been searching everywhere for an easy solution!

Gary Walshgarywalsh Sunday, March 13, 2011 6:07:09 AM

Likewise I've been searching for sometime to find an easier solution for grabbing background images. Many thanks. smile

Unregistered user Wednesday, March 23, 2011 4:56:06 PM

Cute Guy writes: IT worked !!!!! thx !!!

Write a comment

New comments have been disabled for this post.

May 2013
M T W T F S S
April 2013June 2013
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31