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