Return to Snippet

Revision: 18894
at October 11, 2009 16:52 by LuckyShot


Updated Code
// Declare it
var MP3_IMG = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7DAAAOwwHHb6hkAAABl0lEQVR4nJ3P3UuTARTH8fMv9R94Uwp2kaBpWIjDUiRiuBRCDLcnX2JQos6y6cTW3HyZbo0tQbbmhs6XBT3OTWurYKgrvXDeeLELv114YyGPmxfn5vz4fQ5HBJFipqp7iubX88R2c/yTFQvce+mlyrzEM+9PllMXkGKBZtsGTc4MLa4ftNk3SgceO5Ion7JUvwpR9vRd6YDeGiS2m6PGZOeGTrnGC4N+BBGTzUfFE3PpQOuQD0FkcVXFG46XDtT3THNp9v9CzRzijx/giWWJqlm20nsIIg96Z64GllN5rKEjFN8RBuceylyCfleEhUiChr5ZbSCazmMKHLO5X2DzD0yoZ+hnMlQaXdzpHKdjaF4baPfksKfg1ykkT8CdAcP0DuWd76k1TmG0eLSBupGvKKE8k8kCk9sFepYOqTMHuP3cwcM3K1iCv7WBxpEw9weCtE58ocUW526fl8quDzwai9Hh3Lq8fBFwRNLUvnBxyzDKTcPb88vWNdpnv+Fez14NCCLule/ohj/TYImiG11j4GOCsKpRRuQvG2SsxuXIJ3AAAAAASUVORK5CYII=';

// Then call it whenever you need it
aStyle.background = 'transparent url('+MP3_IMG+') no-repeat';

Revision: 18893
at October 11, 2009 16:51 by LuckyShot


Initial Code
var MP3_IMG = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7DAAAOwwHHb6hkAAABl0lEQVR4nJ3P3UuTARTH8fMv9R94Uwp2kaBpWIjDUiRiuBRCDLcnX2JQos6y6cTW3HyZbo0tQbbmhs6XBT3OTWurYKgrvXDeeLELv114YyGPmxfn5vz4fQ5HBJFipqp7iubX88R2c/yTFQvce+mlyrzEM+9PllMXkGKBZtsGTc4MLa4ftNk3SgceO5Ion7JUvwpR9vRd6YDeGiS2m6PGZOeGTrnGC4N+BBGTzUfFE3PpQOuQD0FkcVXFG46XDtT3THNp9v9CzRzijx/giWWJqlm20nsIIg96Z64GllN5rKEjFN8RBuceylyCfleEhUiChr5ZbSCazmMKHLO5X2DzD0yoZ+hnMlQaXdzpHKdjaF4baPfksKfg1ykkT8CdAcP0DuWd76k1TmG0eLSBupGvKKE8k8kCk9sFepYOqTMHuP3cwcM3K1iCv7WBxpEw9weCtE58ocUW526fl8quDzwai9Hh3Lq8fBFwRNLUvnBxyzDKTcPb88vWNdpnv+Fez14NCCLule/ohj/TYImiG11j4GOCsKpRRuQvG2SsxuXIJ3AAAAAASUVORK5CYII=';


aStyle.background = 'transparent url('+MP3_IMG+') no-repeat';

Initial URL


Initial Description
Saves an image as code. Useful for small images.

Initial Title
Embed image as code (for UserScripts)

Initial Tags
javascript, image

Initial Language
JavaScript