PHP class to generate bookmarklets from Javascript code