Hi, I would like to create a bookmarklet that users could install so they can automatically post stories to my site while they are searching the web...
I know there is the code provided to use in the bookmarklet, but how do you actually create it??
Thanks
Comments
Comment #1
frjo commentedSelect the code and drag it to the bookmarkbar, or if you stucked with Internet Explorer, right click on it and add it as a favorite. It just a normal bookmark that happens to contains some JavaScript.
To make it easy for users you can add it as a link to your page, like I have done on http://vigillar.se/help/buttons (in Swedish but you get the picture). Like this:
bookmarklet
Comment #2
patchak commentedThanks, I'll try that!!!
Comment #3
frjo commentedComment #4
patchak commentedThe bookmarklet does not seem to work with internet explorer, any ideas about that?
Thanks
Comment #5
patchak commentedShould add that the exact same code works with firefox.. any ideas?
Thanks
Comment #6
shadyman@erroraccessdenied.com commentedDid you change example.com to the address of your site?
Comment #7
formicin commentedIt works fine in IE6, can you state your version of IE?
Comment #8
kollega commentedIt seems to me that I have problems with ampersands (&).
If i use address http://www.example.com/?module=news&id=17 we'll have with
http://www.example.com/?id=1&module=news&- looks not correct!Comment #9
mstef commentedI just posted a bug regarding this. If the person who clicks the bookmarklet is not logged in there is no way they can submit the link. Unless they login then go back to the other site then press it and come back, etc. I have been trying to fix this for the past 5 hours and nothing..
Help?
Comment #10
mstef commentedI had to create a php hack with the user login system to get this to work. If anyone is interested...
Comment #11
patchak commentedMikestefff: could you post your fix to allow people to use the boormarklet even when they are not logged into the site??
Thanks,
Patchak
Comment #12
unodewaal commentedYeah I'd like to see the bookmarklet work as well!
Comment #13
unodewaal commentedI've gotten my bookmarklet to work fine, but if I want it to popup in a new window, how do I do that? My current code for the bookmarklet is:
thanks
Comment #14
kirkcaraway commentedHas anyone made this bookmarklet hack work? If so, please pass along how you did it. Thanks.
Comment #15
alexandreracine commentedCleaning a little...
4.x versions are not supported anymore.
-You can upgrade
-You can sponsor future developpement of this module (look on the related pages on drupal.org)
-Reopen if needed.
Comment #16
fadgadget commentedI hope you dont mind me reopening this as it's the only place ive actually seen a hint of an answer to my question.
I have made a bookmarklet which you can view in a block at the bottom of this page-
http://onlinebanter.com/web2ob
My code is this-
<a href="javascript:u=document.location.href;t=document.title;s=window.getSelection();void(window.open("http://onlinebanter.com/node/add/web2ob?edit[title]="+escape(t)+'&edit[body_field][body]='+escape(s)+'&edit[field_link][0][url]='+escape(u),'_blank','width=600,height=500,status=yes,resizable=yes,scrollbars=yes'));">bookmarklet</a>but when i try to add that to my browser by dragging it it ruins all the code in my brwoser favourite to this-
javascript:u=document.location.href;t=document.title;s=window.getSelection();void(window.open(and thus my bookmarklet doesnt work. if i edit my bookmark code though manually and add the 1st bit of code i posted here in my browser favourites without the HTML obviously it works well. I have my block on Full HTML with no filters etc. This has been a problem for me for nearly a year now and ive asked about it in various places about the net.
Can anyone help with this? Please and thanks
Ross
Comment #17
fadgadget commentedps i am using the Prepopulate Drupal Module to help me use the code above.
Comment #18
fadgadget commentedsorted
http://stackoverflow.com/questions/6030076/adding-bookmarklet-javascript...
Comment #19
alexandreracine commentedCleaning...
Still valid?
Version 4.?