Gary Mort (garyamort) wrote in lj_nifty,
Gary Mort
garyamort
lj_nifty

Bookmarklet to post to LJ

Here is a little javascript bookmarklet to post messages to Livejournal.

Note: Editted 12:40 10/17/2003, hopefully escaped the < and > signs properly so the code will appear and lj--cut the script so it doesn't appear(again, hopefully) I stole the properly formatted code from geekosaur below and than modified it a bit

Since livejournal has one URL for everyone to access the update page, it will work for everyone without needing to make any changes:



javascript:d=document;t=d.selection?d.selection.createRange().text:d.getSelection();void(window.open('http://www.livejournal.com/update.bml?mode=full&event='+escape(d.title)+escape('\n\n<I>')+escape(t)+escape('</I>\n\n')+'<a href'+escape('=')+'"'+escape(d.location.href)+'">Goto Website</a>'))



The easiest way to use it is to create a new bookmark in your bookmarks folder, and use the above script as the url. When you want to post some text from a website to your blog, swipe the text with your mouse and than click on your bookmark. It will load the livejournal update page with title of the web page(that is the d.title part in the script), the selected text(that is the escape(t) portion) in italics(the <I> and the </I> part), and than a link to the web page you grabbed the text from (the whole HREF= part)

If your using Internet Explorer, there is a registry hack you can do to add an option to the menu that pops up when you right click on a web page, so you could swipe the text, right click, and select something like LJ This! to launch the LJ update page.

If your using Opera like I am, you have all sorts of options. I gave the bookmark a nickname, which means I can type the nicknam(in my case lj) in the address bar and launch the update page. I also added a keyboard shortcut, so CTR-SHIFT-L launches the livejournal page. And I made a new menu.ini file to make enable the ability to right click on a web page and LJ This!

One day I want to figure out how to do a mouse gesture to launch LJ
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 9 comments