From 0038f1f0118ebedddaf62990fc2cde0d7ad84c38 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Thu, 31 Oct 2013 05:21:31 +0100 Subject: [PATCH] Slightly better consistency between "reload"/"refresh"/"update" usage. --- html/Monitoring/ThreadUpdater.html | 2 +- src/General/Settings.coffee | 4 ++-- src/Monitoring/ThreadWatcher.coffee | 9 ++++----- src/Posting/QR.coffee | 2 +- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/html/Monitoring/ThreadUpdater.html b/html/Monitoring/ThreadUpdater.html index 04a6a17b2..32b13b497 100644 --- a/html/Monitoring/ThreadUpdater.html +++ b/html/Monitoring/ThreadUpdater.html @@ -13,5 +13,5 @@
- +
diff --git a/src/General/Settings.coffee b/src/General/Settings.coffee index 17cf7595d..65f2a5094 100644 --- a/src/General/Settings.coffee +++ b/src/General/Settings.coffee @@ -142,7 +142,7 @@ Settings = return div = $.el 'div', - innerHTML: ": Clear manually-hidden threads and posts on all boards. Refresh the page to apply." + innerHTML: ": Clear manually-hidden threads and posts on all boards. Reload the page to apply." button = $ 'button', div hiddenNum = 0 $.get 'hiddenThreads', boards: {}, (item) -> @@ -205,7 +205,7 @@ Settings = try data = JSON.parse e.target.result Settings.loadSettings data - if confirm 'Import successful. Refresh now?' + if confirm 'Import successful. Reload now?' window.location.reload() catch err output.textContent = 'Import failed due to an error.' diff --git a/src/Monitoring/ThreadWatcher.coffee b/src/Monitoring/ThreadWatcher.coffee index 71abca86b..b33e96e71 100644 --- a/src/Monitoring/ThreadWatcher.coffee +++ b/src/Monitoring/ThreadWatcher.coffee @@ -13,10 +13,9 @@ ThreadWatcher = $.on d, '4chanXInitFinished', @ready switch g.VIEW when 'index' - $.on d, 'IndexRefresh', @cb.indexUpdate - $.on d, 'IndexRefresh', @refresh + $.on d, 'IndexRefresh', @cb.onIndexRefresh when 'thread' - $.on d, 'ThreadUpdate', @cb.threadUpdate + $.on d, 'ThreadUpdate', @cb.onThreadRefresh now = Date.now() if (@db.data.lastChecked or 0) < now - 2 * $.HOUR @@ -74,7 +73,7 @@ ThreadWatcher = $.set 'AutoWatch', threadID else if Conf['Auto Watch Reply'] ThreadWatcher.add board.threads[threadID] - indexUpdate: -> + onIndexRefresh: -> {db} = ThreadWatcher for threadID, data of db.data.boards[g.BOARD.ID] when threadID not in g.BOARD.threads if Conf['Auto Prune'] @@ -84,7 +83,7 @@ ThreadWatcher = db.data.lastChecked = Date.now() db.save() ThreadWatcher.refresh() - threadUpdate: (e) -> + onThreadRefresh: (e) -> {thread} = e.detail return unless e.detail[404] and ThreadWatcher.db.get {boardID: thread.board.ID, threadID: thread.ID} # Update 404 status. diff --git a/src/Posting/QR.coffee b/src/Posting/QR.coffee index b244a984b..9f81f22a3 100644 --- a/src/Posting/QR.coffee +++ b/src/Posting/QR.coffee @@ -701,7 +701,7 @@ QR = imgContainer = $.el 'div', className: 'captcha-img' - title: 'Reload' + title: 'Reload reCAPTCHA' innerHTML: '' input = $.el 'input', className: 'captcha-input field'