Posts

Showing posts from August, 2008

IE8 Beta 2 - inline images, and anything else

With IE8, we finally can "play" with inline images, specially for CSS or other little decorations. The main limitation is that the length of the data protocol has a maximum fixed length, but even worst is that IE8 apparently introduced the data protocol only for images. In another scenario,where we would like to use the same technique for other purposes, IE is still the only browser that does not respect standards. This is an example: function evalazy(src, callback){ var script = document.createElement("script"), body = document.documentElement; if(callback) script.onload = callback; script.type = "application/javascript"; script.src = "data:" + script.type + "," + encodeURIComponent(src); body.removeChild(body.appendChild(script)); }; Above function is able to evaluate valid JavaScript code in an asynchronous way, calling a callback, if any, when evaluation has been completed ( kinda load runt

How to crash FireFox 3 with 3 lines of code

Hi there, here I am back from holidays :geek: Before I'll start to write more interesting stuff, here we have 3 lines of JavaScript that could cause problems to our favourite browser, in this case version 3.0.1 I discovered this problem, already part of the bugs report site, trying to emulate keyboards events using the UIEvents interface instead of KeyboardEvents var e = document.createEvent("UIEvents"); e.initUIEvent("keypress", true, true, this, 1); document.documentElement.dispatchEvent(e); Nice one? See you soon ;)

Image Protector, a nice waste of time

I've read right now about another, pointless, attempt, to avoid the classic Save Image As from a website. Guys, we are in 2008, and I hope that everybody knows what can the simple Stamp / Print button can do, when we are simply watching whatever in our screen. No way, every tot months, somebody "creates" the ultimate version of an Image Protector , usually based on JavaScript, then "startly pointless" because JS could be easily disabled. Morevore, this times the trickless trick even requires an excellent library as MooTools is. Well, since I hate disinformations about techniques to make data truly safe, I can tell you that you need 159 characters to remove the protecion , javascript protocol included. The funny stuff is that basing the same anti protector over MooTools, since this library is required for the amazing protector, you need even less characters to do the same, basing them on a $$("img") call, instead of document.getElementsByTagName. Bei