2 // If javascript is enabled, display the button
\r
3 document.getElementById('yourls-always').style.display = 'block';
\r
5 // When button clicked, store a cookie that says the user doesn't want a toolbar
\r
6 document.getElementById('yourls-always').onclick = yourls_cookie_no_toolbar_please;
\r
7 function yourls_cookie_no_toolbar_please() {
\r
8 var exdate=new Date();
\r
9 exdate.setDate( exdate.getDate()+365 ); // store 365 days
\r
10 document.cookie = "yourls_no_toolbar=1;expires="+exdate.toUTCString() ;
\r
13 // Get the number of delicious bookmarks
\r
14 function yourls_get_books(json) {
\r
16 var books = json[0].total_posts.toString();
\r
18 document.getElementById('yourls-delicious-link').innerHTML = ' <b>'+books+'</b> bookmarks';
\r