javascript - dont allow user to see image source -
i see site www.travian.com , site images make list , call function
var screenshots = [ {'img':'screenbig screenbig1','hl':'village centre', 'desc':'your village 1 day, becoming starting point vast empire.'}, ]; in file found
object.each(screenshots, function (d) { a.addimg(d.img) }); then addimg function
var = new element("img", {src: "img/x.gif", "class": b, width: this.options.pimgwidth, height: 397}).inject(this.options.prev_items) inject function
element.prototype.inject = element.prototype.inject.wrap(function (f, b, d, c) { var = f(b, d, c); var e; if (typeof != "undefined" && (typeof(e = a.select("script")) == "array")) { e.each(function (g) { browser.exec(g.text) }) } return }); and in end exec
n.exec = function (o) { if (!o) { return o } if (g.execscript) { g.execscript(o) } else { var e = j.createelement("script"); e.setattribute("type", "text/javascript"); e.text = o; j.head.appendchild(e); j.head.removechild(e) } return o }; this intersting me src of images src="x.gif" 1px * 1px size , show correct image, follow code , dont answer how write code here see can me found how work
in travian.com, images come css. javascript code listed creates <img> elements specific ids.
you can use browsers "inspect element" functionality find this.
html:
<img src="img/x.gif" class="screen3" alt=""> css:
div#gallery img.screen3 { background-image: url(s/img3.jpg); }
Comments
Post a Comment