Can a Javascript bookmarklet overlay an image on a web page?
Posted
by songdogtech
on Stack Overflow
See other posts from Stack Overflow
or by songdogtech
Published on 2010-03-19T19:31:33Z
Indexed on
2010/03/19
20:21 UTC
Read the original article
Hit count: 239
Can a bookmarklet be used to overlay an image on a web page? Not as a pop-up, but as a image positioned by CSS and with a high z-index to display on top of other elements. And without a mask i.e., Shadowbox or similar jQuery effect. Just an image from a URL and positioned in the bottom left hand corner of the browser window.
This is what I have so far, but it may be the wrong direction to be going:
javascript:(function(){document.write("body {background-image:url(http://mydomain.com/image.png); position: absolute; left:50px; top:300px; z-index:9999;}");})()
I have a JS function that works as a bookmarklet to change the case of text on the page, and now I'd like to be able to show an image when the bookmarklet is used.
© Stack Overflow or respective owner