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

Add to button

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

I asked on #statusnet channel on about it and was pointed to an available bookmarklet which could be used with an image for a link to create a decent "add to 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='',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(!,'t','toolbar=0,resizable=0,scrollbars=1,status=1,width=450,height=200')){l.href=g;}}a();})()"><img src="" /></a>

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 button below.

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