dracodraconis (
dracodraconis) wrote in
dw_nifty2009-04-30 08:06 am
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
![[site community profile]](https://www.dreamwidth.org/img/comm_staff.png)
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='ht tp://www.dreamwidth.org/',w=window.open( '','','toolbar=0,resizable=1,scrollbars=1,s tatus=1,width=1000,height=500');if(windo w.LJ_bookmarklet){return%20LJ_bookmarkle t(w,u)};var%20e=document.createElement('s cript');e.setAttribute('type','text/java script');e.onload=function(){LJ_bookmark let(w,u)};e.setAttribute('src','http://w ww.livejournal.com/js/bookmarklet.js');d ocument.getElementsByTagName('head').ite m(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.
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='ht
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.