diff --git a/src/Filtering/Filter.coffee b/src/Filtering/Filter.coffee index 70feefb3b..2286359c1 100644 --- a/src/Filtering/Filter.coffee +++ b/src/Filtering/Filter.coffee @@ -30,7 +30,7 @@ Filter = regexp = RegExp regexp[1], regexp[2] catch err # I warned you, bro. - new Notification 'warning', err.message, 60 + new Notice 'warning', err.message, 60 continue # Filter OPs along with their threads, replies only, or both. diff --git a/src/General/Header.coffee b/src/General/Header.coffee index 55210db34..fd81f49cb 100644 --- a/src/General/Header.coffee +++ b/src/General/Header.coffee @@ -175,7 +175,7 @@ Header = 'The header bar will automatically hide itself.' else 'The header bar will remain visible.' - new Notification 'info', message, 2 + new Notice 'info', message, 2 setBarPosition: (bottom) -> Header.barPositionToggler.checked = bottom @@ -266,5 +266,5 @@ Header = createNotification: (e) -> {type, content, lifetime, cb} = e.detail - notif = new Notification type, content, lifetime + notif = new Notice type, content, lifetime cb notif if cb diff --git a/src/General/Main.coffee b/src/General/Main.coffee index ff94152fc..4c1be0574 100644 --- a/src/General/Main.coffee +++ b/src/General/Main.coffee @@ -34,7 +34,7 @@ Main = $.extend Conf, items <% if (type === 'crx') { %> unless items - new Notification 'error', $.el 'span', + new Notice 'error', $.el 'span', innerHTML: """ It seems like your <%= meta.name %> settings became corrupted due to a Chrome bug.
Unfortunately, you'll have to fix it yourself. @@ -208,7 +208,7 @@ Main = try localStorage.getItem '4chan-settings' catch err - new Notification 'warning', 'Cookies need to be enabled on 4chan for <%= meta.name %> to properly function.', 30 + new Notice 'warning', 'Cookies need to be enabled on 4chan for <%= meta.name %> to properly function.', 30 $.event '4chanXInitFinished' @@ -250,7 +250,7 @@ Main = else if errors.length is 1 error = errors[0] if error - new Notification 'error', Main.parseError(error), 15 + new Notice 'error', Main.parseError(error), 15 return div = $.el 'div', @@ -266,7 +266,7 @@ Main = for error in errors $.add logs, Main.parseError error - new Notification 'error', [div, logs], 30 + new Notice 'error', [div, logs], 30 parseError: (data) -> Main.logError data diff --git a/src/General/Notification.coffee b/src/General/Notification.coffee index a3f1d8d1c..d0624a3a4 100644 --- a/src/General/Notification.coffee +++ b/src/General/Notification.coffee @@ -1,4 +1,4 @@ -class Notification +class Notice constructor: (type, content, @timeout) -> @el = $.el 'div', innerHTML: '×
' diff --git a/src/General/Settings.coffee b/src/General/Settings.coffee index 4ccef2403..17cf7595d 100644 --- a/src/General/Settings.coffee +++ b/src/General/Settings.coffee @@ -29,7 +29,7 @@ Settings = changelog = '<%= meta.repo %>blob/<%= meta.mainBranch %>/CHANGELOG.md' el = $.el 'span', innerHTML: "<%= meta.name %> has been updated to version #{g.VERSION}." - new Notification 'info', el, 30 + new Notice 'info', el, 30 else $.on d, '4chanXInitFinished', Settings.open # The archive list will always be updated with 4chan X updates. diff --git a/src/Monitoring/ThreadUpdater.coffee b/src/Monitoring/ThreadUpdater.coffee index 146027c65..fa3d81963 100644 --- a/src/Monitoring/ThreadUpdater.coffee +++ b/src/Monitoring/ThreadUpdater.coffee @@ -162,14 +162,14 @@ ThreadUpdater = 'The thread is not a sticky anymore.' else 'The thread is not closed anymore.' - new Notification 'info', message, 30 + new Notice 'info', message, 30 $.rm $ ".#{titleLC}Icon", ThreadUpdater.thread.OP.nodes.info return message = if title is 'Sticky' 'The thread is now a sticky.' else 'The thread is now closed.' - new Notification 'info', message, 30 + new Notice 'info', message, 30 icon = $.el 'img', src: "//static.4chan.org/image/#{titleLC}.gif" alt: title diff --git a/src/Posting/QR.coffee b/src/Posting/QR.coffee index f00c74cfc..03f178910 100644 --- a/src/Posting/QR.coffee +++ b/src/Posting/QR.coffee @@ -112,7 +112,7 @@ QR = # Focus the captcha input on captcha error. QR.captcha.nodes.input.focus() alert el.textContent if d.hidden - QR.notifications.push new Notification 'warning', el + QR.notifications.push new Notice 'warning', el notifications: [] cleanNotifications: -> for notification in QR.notifications @@ -1064,7 +1064,7 @@ QR = h1 = $ 'h1', resDoc QR.cleanNotifications() - QR.notifications.push new Notification 'success', h1.textContent, 5 + QR.notifications.push new Notice 'success', h1.textContent, 5 QR.persona.set post @@ -1114,5 +1114,5 @@ QR = delete QR.req QR.posts[0].unlock() QR.cooldown.auto = false - QR.notifications.push new Notification 'info', 'QR upload aborted.', 5 + QR.notifications.push new Notice 'info', 'QR upload aborted.', 5 QR.status()