We all know that bookmarklets are nothing but some executable javascript code that do some things for us when we click on them depending on the function that they are intended to do... My Question is:
For example, I have a Bookmarklet, don't know, something like this one:
javascript:void(window.open('http://www.pdfdownload.org/web2pdf/Default.aspx?left=0&right=0&top=0&bottom=0&page=0&cURL='+document.location.href));
As far as I understand, the bookmarklet code (with the "&cURL=" thing) takes the URL that is in the adress bar of the browser and then do something with it in order to get a result. Something similar can be done with a selection, by changing some parameters in the bookmarklet (Like with the "Search selection in Google Maps" one) and some others.
How can I "decompile" a bookmarklet in order to make it take the desired data (in this case an URL) from a form?
For example, let's say I want to use the above bookmarklet in a webpage to provide a form that let's the user input a URL and then click a button to get the result.
I've seen other bookmarklets that get the URL from a "?input=" and others from a "?url="
How can I pass bookmarklet's functions to a form?