views:

14

answers:

0

The bookmarklet has the following code:

javascript:(function(){var%20a=window,b=document,c=encodeURIComponent,d=a.open("http://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk="+c(b.location)+"&title="+c(b.title),"bkmk_popup","left="+((a.screenX||a.screenLeft)+10)+",top="+((a.screenY||a.screenTop)+10)+",height=420px,width=550px,resizable=1,alwaysRaised=1");a.setTimeout(function(){d.focus()},300)})();

There is a validation function and a random key in the popup window:

<input type=submit name=btnA style="font-weight:bold" onclick="return _validate_add_bkmk(document.add_bkmk_form) && addp('btnA')"value="Add bookmark">

Here is the addp function:

<script>function addp(p) {document.add_bkmk_form.action = document.add_bkmk_form.action + "&" + p;return true;}</script>

The form in the popup window contains a random value called 'sig' which is part of the popup form submit action:

<form name="add_bkmk_form" action="/bookmarks/mark?sig=2bbEz24YrH7rmG2yhwYeLQ&hl=en" method=post target="_self">

Is it possible to change the bookmarklet so it autosubmits the form to create the bookmarklet? - would be great to click the bookmarklet so the current page is bookmarked in the background without having to go through the popup submission process.

Any ideas much appreciated.