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