Can a Javascript bookmarklet overlay an image on a web page?
- by songdogtech
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.