]> CyberLeo.Net >> Repos - Github/YOURLS.git/blob - user/plugins/sample-toolbar/js/toolbar.js
A toolbar. For those who like them. Yuck. Fixes issue 228.
[Github/YOURLS.git] / user / plugins / sample-toolbar / js / toolbar.js
1 \r
2 // If javascript is enabled, display the button\r
3 document.getElementById('yourls-always').style.display = 'block';\r
4 \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
11 }\r
12 \r