Reply to comment

Prepopulate and Bookmarklets in Drupal

OK, so FINALLY I figured how to get my old blog and link bookmarklets working again in Drupal.

You need to install the prepopulate module first.

Then, use this code in a bookmarklet. It does not work as well as I want yet, so improvements are appreciated!

I am aware the code will scroll off the center column and under the next, but if you double click on it, you should be able to select it all no problem.

Enjoy, and leave a comment if you have a suggestion Cool

Blog bookmarklet:

javascript: u=document.location.href; t=document.title.replace(/\|/g,'::'); s=''+window.getSelection()+''; pre='From '+escape(t) + escape(': '); void(window.open('http://yoursite.com/node/add/blog?edit[url]='+escape(u)+'&edit[title]='+escape(t)+'&edit[body]='+escape(s)+pre+escape('Link'),'_blank','width=910,height=600,status=yes,resizable=yes,scrollbars=yes'));

userlink bookmarklet:

javascript: u=document.location.href; t=document.title.replace(/\|/g,'::'); s=''+window.getSelection()+''; void(window.open('http://yoursite.com/node/add/userlink?edit[url]='+escape(u)+'&edit[title]='+escape(t)+'&edit[body]='+escape(s),'_blank','width=910,height=600,status=yes,resizable=yes,scrollbars=yes'));

Original code found here.

Reply

  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options


Check out Gangster Politics Montreal.