dracodraconis: (Default)
dracodraconis ([personal profile] dracodraconis) wrote in [site community profile] dw_nifty2009-04-30 08:06 am

DW/LJ submitlet bookmark function

When LiveJournal introduced it's javascript-based submitlet function, it made my life easier, being a person who mostly posts current articles in news, science, and technology with a summary and the ocassional snarky comment if warranted. For those who may not know of what I speak, the submitlet script allows you to, when on a page the link for which you want to submit as a new post to LJ, automatically copy the page information and link as a new LJ post in a new window. When I came to DreamWidth I missed having this function so set about remedying the solution.

What I came up with still uses javascript from the LiveJournal site, but creates a new DreamWidth post. Create a new bookmark and use some appropriate descriptor (I use "Submit to Dreamwidth"). In the Location box, cut-and-paste the following:

javascript:void((function(){var%20u='http://www.dreamwidth.org/',w=window.open(
'','','toolbar=0,resizable=1,scrollbars=1,status=1,width=1000,height=500');if(window.LJ_bookmarklet){return%20LJ_bookmarklet(w,u)};var%20e=document.createElement('script');e.setAttribute('type','text/javascript');e.onload=function(){LJ_bookmarklet(w,u)};e.setAttribute('src','http://www.livejournal.com/js/bookmarklet.js');document.getElementsByTagName('head').item(0).appendChild(e)})())

As you can see, the script still calls LJ's bookmarklet.js function, but gets the job done. Ideally, I would like to have everything run either entirely locally or on a DW server, but this gets the job done in the meantime.
psycho_mama: me and skelly (Default)

[personal profile] psycho_mama 2009-04-30 08:53 pm (UTC)(link)
Thank you! I haven't used the LJ one but I look forward to using this one.
elizaria: cat laying on a pillow (cat- lazy)

[personal profile] elizaria 2009-04-30 09:09 pm (UTC)(link)
Cool, I didn't even know LJ had this option. I definitely plan to use this here at DW. Thanks!
bluemeridian: Chloe from Smallville, with coffee and a sideways look. (Default)

[personal profile] bluemeridian 2009-04-30 10:38 pm (UTC)(link)
Oh, nice -- thanks!
katfusion: (Default)

[personal profile] katfusion 2009-04-30 10:46 pm (UTC)(link)
Awesome! I didn't know this existed at LJ, but I plan to use it now. Thanks for posting!
amokk: (Bitch)

[personal profile] amokk 2009-04-30 11:33 pm (UTC)(link)
I now have them sitting nicely next to each other on my Bookmarks Toolbar. :)
firiel44: (Beaker freakout)

[personal profile] firiel44 2009-05-01 01:09 am (UTC)(link)
That is entirely fabulous! Thanks so much!
coprime: an awesome lady stepping out of a boat (Default)

[personal profile] coprime 2009-05-01 03:37 am (UTC)(link)
Ooh, neat! I was missing this a lot.
dreamweaver: A white mug of coffee sitting on a wooden table beside a computer (Best Part of the day: Computer and coffe)

[personal profile] dreamweaver 2009-05-04 12:30 am (UTC)(link)
Errrr maybe this is really dumb, and this is cool, but I'm missing something. When I copy the code, where do I paste it?
manifestjoy: From the online comic Sinfest (other - heart in the clouds)

[personal profile] manifestjoy 2009-05-05 04:09 am (UTC)(link)
Thanks so much for working on and posting this!

I fiddled around with my LJ bookmarklet trying to get it to work for me, but I didn't have the patience.

This one fits the bill nicely.
stardragon_the_canadian: (Default)

[personal profile] stardragon_the_canadian 2009-05-05 04:29 pm (UTC)(link)
*waves*
qilin: A colorful, squat ceramic qilin (ceramic)

[personal profile] qilin 2009-10-29 08:32 am (UTC)(link)
Hi! I run [site community profile] dw_nifty and I think this would make a great post, if you'd like to post it over there. If not, would you mind if I used the material for a post?
giglet: (Default)

[personal profile] giglet 2011-03-02 06:17 pm (UTC)(link)
Thank you!
(reply from suspended user)