This commit is contained in:
Henrique Dias committed 2015-09-26 11:42:00 +01:00
1 parent d569e67642
commit 5316686d2d
6 files changed
+85 -86

No files matched your search

+4 -4
View File
@@ -69,10 +69,10 @@ notification = function(options) {
options = $.extend({}, defaults, options);
noty(options);
if (!Cookies.get('stickynoties') && !options.timeout) {
Cookies.set('stickynoties', 'true', {
expires: 365
});
if (!document.cookie.replace(/(?:(?:^|.*;\s*)stickynoties\s*\=\s*([^;]*).*$)|^.*$/, "$1") && !options.timeout) {
var date = new Date();
date.setDate(date.getDate() + 365);
document.cookie = 'stickynoties=true; expires=' + date.toUTCString + '; path=/';
notification({
text: "Some notifications are sticky. If it doesn't go away, click to dismiss it.",