Skip to main content
Welcome guest. | Register | Login | Post

Add to Identi.ca button

In addition to the tweet widget that is now available below all articles with this new Nuxified design I added an identi.ca widget. It seems like a good idea given that this site is about Free and Open Source Software and Identi.ca is built with FOSS.

I asked on #statusnet channel on irc.freenode.net about it and was pointed to an available identi.ca bookmarklet which could be used with an image for a link to create a decent "add to identi.ca widget". That worked like a charm.

Here is the full code along with the image and styling:

<div class="identica" style="background-color: white;
border: 1px solid #ddd;">
<a href="javascript:(function(){var%20d=document,w=window,e=w.getSelection,k=d.getSelection,x=d.selection,s=(e?e():(k)?k():(x?x.createRange().text:0)),f='http://identi.ca//index.php?action=bookmarklet',l=d.location,e=encodeURIComponent,g=f+'&status_textarea=%E2%80%9C'+((e(s))?e(s):e(document.title))+'%E2%80%9D%20%E2%80%94%20'+l.href;function%20a(){if(!w.open(g,'t','toolbar=0,resizable=0,scrollbars=1,status=1,width=450,height=200')){l.href=g;}}a();})()"><img src="http://www.nuxified.org/images/identica.png" /></a>
</div>

I have a few more lines of CSS in a separate CSS file specific to its position on this site, but the inline style is all you need for it to look like the white identi.ca button below.

Feel free to use the code as is on your site if you like.