Sunday, January 27, 2008

[Javascript, DHTML] Easiest way to add post from Blogger

problem: There's no way in hell you can find any ready-to-use pluggable html snippet to add the current page of your blogger blog (current version) to the user's links.

solution: copy-paste the following wherever you want:

<a href='' id='delicious'>
<img alt='Add the butchers to your!'

<script language='javascript'

var currentURL = window.location;
document.getElementById('delicious').href =
"" + currentURL;


I am lazy, so I was looking for something to copy-paste into the html and amen. After an hour or so of roaming without finding anything usable as-it-is, I decided my laziness was costing me more than actually making the thing myself (what the heck). So I did it. This technique obviously will work with any of the linksharing networks (digg and others) or whatever, but the difference is I could find ready-to-plug snippet for the others. Maybe it'll save some precious hours of laziness to some other copy-paste butcher.


Scuffia said...

God damn :) That is maybe the coolest post ever seen!

Buck said...

Nice one. It works like charme