Do you Java-script?
September 16, 2009 9:06 AM
Subscribe
Calling all Javascript Experts: I am trying to tweak a small javascript bookmarklet to improve its functionality. The fact I dont know HOW is turning out to be a bit of a challenge. Help me please!
javascript:void(location.href='http://html-pdf-converter.com/en/convert?u='+escape(location.href))
This bookmarklet opens the webpage of html-pdf-converter but I want it to to open a new page and load the url where I am when I click on the bookmarklet. (I know it can be done because my other favourite bookmarklet does it for a different purpose) see code here:
javascript:popw='';Q='';x=document;y=window;if(x.selection)%20{Q=x.selection.createRange().text;}%20else%20if%20(y.getSelection)%20{Q=y.getSelection();}%20else%20if%20(x.getSelection)%20{Q=x.getSelection();}popw%20=%20y.open('https://mail.google.com/a/xxxx.comk/?view=cm&fs=1&tf=1&to=&su='%20+%20escape(document.title)%20+%20'&body='%20+%20escape(Q)%20+%20escape('\n')%20+%20escape(location.href)%20+%20'&bcc='%20+%20escape("xxxx@xxxx.com")%20+%20'&zx=RANDOMCRAP&shva=1&disablechatbrowsercheck=1&ui=1','gmailForm','scrollbars=yes,width=680,height=510,top=175,left=75,status=no,resizable=yes');if%20(!document.all)%20T%20=%20setTimeout('popw.focus()',50);void(0);
Now if only I can get someone to help me pick the best bits from both and make it work.
EXTRA points, if someone can also get it to press the 'convert' button so all I get is a save/open dialogue.
In case you are wondering, I have tried using software on my computer to convert like cutepdf but the output is not nearly as good as this.
Many thanks
posted by london302 to computers & internet (10 comments total)
posted by london302 at 9:07 AM on September 16