From 9737cb47d55d1f1b0d29f1e2bf425e779097ef30 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sun, 11 Jan 2015 14:47:05 -0800 Subject: [PATCH] Highlight thread watcher icon when there are unread replies and the thread watcher is hidden. --- src/General/css/burichan.css | 2 +- src/General/css/futaba.css | 2 +- src/General/css/photon.css | 2 +- src/General/css/style.css | 2 +- src/General/css/tomorrow.css | 2 +- src/General/css/yotsuba-b.css | 2 +- src/General/css/yotsuba.css | 2 +- src/Monitoring/ThreadWatcher.coffee | 3 +++ 8 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/General/css/burichan.css b/src/General/css/burichan.css index ec51f6a48..b7f42f3af 100755 --- a/src/General/css/burichan.css +++ b/src/General/css/burichan.css @@ -70,7 +70,7 @@ } /* Thread Watcher */ -:root.burichan .replies-quoting-you > a { +:root.burichan .replies-quoting-you > a, :root.burichan #watcher-link.disabled.replies-quoting-you { color: #F00; } diff --git a/src/General/css/futaba.css b/src/General/css/futaba.css index dfbbeb4c4..868307102 100755 --- a/src/General/css/futaba.css +++ b/src/General/css/futaba.css @@ -70,7 +70,7 @@ } /* Thread Watcher */ -:root.futaba .replies-quoting-you > a { +:root.futaba .replies-quoting-you > a, :root.futaba #watcher-link.disabled.replies-quoting-you { color: #F00; } diff --git a/src/General/css/photon.css b/src/General/css/photon.css index d6dfccc71..3baf73a8b 100755 --- a/src/General/css/photon.css +++ b/src/General/css/photon.css @@ -78,7 +78,7 @@ } /* Thread Watcher */ -:root.photon .replies-quoting-you > a { +:root.photon .replies-quoting-you > a, :root.photon #watcher-link.disabled.replies-quoting-you { color: #00F !important; } diff --git a/src/General/css/style.css b/src/General/css/style.css index 837f8dbe6..342097ff1 100755 --- a/src/General/css/style.css +++ b/src/General/css/style.css @@ -269,7 +269,7 @@ audio.controls-added { content: "]\\00a0"; } .dead-thread, -.disabled { +.disabled:not(.replies-quoting-you) { opacity: .45; } #shortcuts { diff --git a/src/General/css/tomorrow.css b/src/General/css/tomorrow.css index 9642547a2..55c832913 100755 --- a/src/General/css/tomorrow.css +++ b/src/General/css/tomorrow.css @@ -87,7 +87,7 @@ } /* Thread Watcher */ -:root.tomorrow .replies-quoting-you > a { +:root.tomorrow .replies-quoting-you > a, :root.tomorrow #watcher-link.disabled.replies-quoting-you { color: #F00 !important; } diff --git a/src/General/css/yotsuba-b.css b/src/General/css/yotsuba-b.css index 3bc0c94f3..3e021e71e 100755 --- a/src/General/css/yotsuba-b.css +++ b/src/General/css/yotsuba-b.css @@ -71,7 +71,7 @@ } /* Thread Watcher */ -:root.yotsuba-b .replies-quoting-you > a { +:root.yotsuba-b .replies-quoting-you > a, :root.yotsuba-b #watcher-link.disabled.replies-quoting-you { color: #F00; } diff --git a/src/General/css/yotsuba.css b/src/General/css/yotsuba.css index 314dba171..cfb81cd97 100755 --- a/src/General/css/yotsuba.css +++ b/src/General/css/yotsuba.css @@ -70,7 +70,7 @@ } /* Thread Watcher */ -:root.yotsuba .replies-quoting-you > a { +:root.yotsuba .replies-quoting-you > a, :root.yotsuba #watcher-link.disabled.replies-quoting-you { color: #F00; } diff --git a/src/Monitoring/ThreadWatcher.coffee b/src/Monitoring/ThreadWatcher.coffee index 8d1cd0a45..18e764e0d 100755 --- a/src/Monitoring/ThreadWatcher.coffee +++ b/src/Monitoring/ThreadWatcher.coffee @@ -294,6 +294,8 @@ ThreadWatcher = toggler.title = "#{helper[1]} Thread" $[helper[0]] thread.catalogView.nodes.root, 'watched' if thread.catalogView + ThreadWatcher.shortcut.classList.toggle 'replies-quoting-you', !!$('.replies-quoting-you', ThreadWatcher.dialog) + for refresher in ThreadWatcher.menu.refreshers refresher() @@ -317,6 +319,7 @@ ThreadWatcher = if line = $ "#watched-threads > [data-full-i-d='#{boardID}.#{threadID}']", ThreadWatcher.dialog newLine = ThreadWatcher.makeLine boardID, threadID, data $.replace line, newLine + ThreadWatcher.shortcut.classList.toggle 'replies-quoting-you', !!$('.replies-quoting-you', ThreadWatcher.dialog) else ThreadWatcher.refresh()