Can a .BMP file be stored in an HTA (HTML/VBScript)? -
i've noticed in backup of firefox bookmarks icon displayed left of each entry held character stream in tags. example:
icon="data:image/png;base64,ivbor [data removed shorten example] rkjggg=="
i have 3 bmp files (2 4x20 (249 bytes) , 1 102x82 (24.7 kb))
hide within html application don't lost.
the larger 1 appears 3 times in style tag follows (1 occurrence shown):
<style type="text/css"> #frmmainbody {background:grey; background-image:url('background.bmp'); margin:0; padding:0; font:normal 10pt microsoft sans serif;} </style>
the other 2 appear in vbscript subroutines follows:
sub button_glow ' highlights button when cursor hovers on it. window.event.srcelement.style if .backgroundcolor <> "lavender" .backgroundcolor = "lavender" .backgroundimage = "url(glow.bmp)" .backgroundpositiony = -2 .backgroundrepeat = "repeat-x" end if end end sub 'button_glow
is possible ?
hta plain text editable markup language can open , edit plain text editor such notepad++.
you can store image format in html, css, etc converting image base64, in place of
<img src="mypath/myimage.bmp" /> <style type="text/css"> foo { background: url(mypath/myimage.bmp); } </style>
you put ::
<img src="data:image/x-png;base64,ivborw0kggoaaaans....." /> <style type="text/css"> foo { background: url(data:image/x-png;base64,ivborw0kggoaaaans.....); } </style>
to make easier you, can convert image format using online tool such 1 located here >> convert image base64 string << .
how apply code in question
using 1 of tools (or writing own), locate , convert 'background.bmp' base64, modify first block of code posted (also shortened save space)
<style type="text/css"> #frmmainbody {background:grey; background-image:url(data:image/x-png;base64,ivborw0kggoaaaans....); margin:0; padding:0; font:normal 10pt microsoft sans serif;} </style>
next, vbscript code, locate , convert 'glow.bmp' (same did 'background.bmp' above), , modify block of code looks this
sub button_glow ' highlights button when cursor hovers on it. window.event.srcelement.style if .backgroundcolor <> "lavender" .backgroundcolor = "lavender" .backgroundimage = "data:image/x-png;base64,ivborw0kggoaaaans....." .backgroundpositiony = -2 .backgroundrepeat = "repeat-x" end if end end sub
Comments
Post a Comment