0

I am hacking the Google bookmarks bookmarklet to make it suit for a new purpose. The end-goal is to convert songs from youtube straight to mp3s, with the help of a 3rd party website. It's all ready pretty awesome. xD xD

However, when I want to convert 4 or 5 songs at the same time, the bookmarklet keeps opening up each conversion in the same window. I need to open up multiple windows and let them stay open.

So, my question is:

How can I get this javascript to open a "new" (!) window each time I hit it?

javascript:(function(){var a=window,b=document,c=encodeURIComponent,d=a.open("http://audio-conversion.online-convert.com/?external_url="+c(b.location),"name= My Window1","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)})();
tshepang
  • 12,111
  • 21
  • 91
  • 136

1 Answers1

0

You can easily append Random number to the window title :)

I modified your code to do this :

javascript:(function(){var a=window,b=document,c=encodeURIComponent,d=a.open("http://audio-conversion.online-convert.com/?external_url="+c(b.location),"name= My Window1"+Math.random(),"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)})();
Ahmed Hashem
  • 360
  • 1
  • 10