Reminder: makeBookmarkletCommand
Par Alexis Bauchu le jeudi, janvier 8 2009, 00:49 - Développement - Lien permanent
This is just a reminder: how to make a command out of a bookmarklet. For example, a command that embed a Flickr photo (the example is taken from Aza Raskin's blog).
CmdUtils.makeBookmarkletCommand({ name: "Embed Flickr Photo", url: "javascript:(function(){if(window.page_p)window.open('http://www.elsewhere.org/mbedr/?p='+window.page_p.id);%20else%20alert('No%20Flickr%20photo%20found.');})()" });
Replace the url by your bookmarklet code.