I have some javascript bookmarks (basically they just insert the current date in an appropriate place in the URL and then open it. Example at the bottom).
Both just cli… (మరింత చదవండి)
I have some javascript bookmarks (basically they just insert the current date in an appropriate place in the URL and then open it. Example at the bottom).
Both just clicking on these bookmark or left clicking and "open in new tab" or "open in new window" works as expected, that is,
- the computed URL is displayed in the address bar
- and the page is displayed.
So, fundamentally the javascript bookmarks work as I expect.
Now my problem:
If I put this bookmark in a folder (either alone or together with other bookmarks), left click on the folder and select "open all bookmarks" it will open a new tab for each entry and the normal bookmarks are loaded in the tab as expected.
But the tab corresponding to the javascript bookmark opens, and
- displays the javascript code (and not the computed URL)
- shows a blank page
What do I have to do that "open all bookmarks" also execute the javascript?
Example bookmark:
javascript:function%20url(){%20%20%20%20%20%20var%20date%20=%20new%20Date();%20%20%20%20%20%20var%20y%20=%20date.getFullYear();%20%20%20%20%20var%20m%20=%20date.getMonth()+1;%20%20%20%20%20var%20d%20=%20date.getDate();%20%20%20%20%20%20if(m%20<%2010){m%20=%20'0'%20+%20m;}%20%20%20%20%20if(d%20<%2010){d%20=%20'0'%20+%20d;}%20%20%20%20%20%20var%20date%20=%20"/"%20+%20y%20+%20"/"%20+%20m%20+%20"/"%20+%20d;%20%20%20%20%20%20return%20'http://www.gocomics.com/calvinandhobbes'+%20date%20+'/';%20%20}%20window.open(url(),"_parent");