Add highlight posts quoting you option

This commit is contained in:
Jordan Bates 2013-05-03 17:08:54 -07:00
parent 1e3e91c5e0
commit aee52eabf2
7 changed files with 31 additions and 4 deletions

View File

@ -1,3 +1,6 @@
seaweedchan:
- Add `Highlight Posts Quoting You` option
### 1.1.10 - 2013-05-03 ### 1.1.10 - 2013-05-03
seaweedchan: seaweedchan:
- Fix update checking - Fix update checking

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -319,6 +319,10 @@ Config =
true true
'Add \'(You)\' to quotes linking to your posts.' 'Add \'(You)\' to quotes linking to your posts.'
] ]
'Highlight Posts Quoting You': [
false
'Highlights any posts that contain a quote to your post.'
]
'Highlight Own Posts': [ 'Highlight Own Posts': [
false false
'Highlights own posts if Mark Quotes of You is enabled.' 'Highlights own posts if Mark Quotes of You is enabled.'

View File

@ -505,7 +505,8 @@ a.hide-announcement {
.qphl { .qphl {
outline: 2px solid rgba(216, 94, 49, .7); outline: 2px solid rgba(216, 94, 49, .7);
} }
.highlight-own .yourPost>.reply { :root.highlight-own .yourPost>.reply,
:root.highlight-you .quotesYou>.reply {
border-left: 2px solid rgba(221,0,0,.5); border-left: 2px solid rgba(221,0,0,.5);
} }
/* Quote Threading */ /* Quote Threading */

View File

@ -17,6 +17,9 @@ QuoteYou =
if Conf['Highlight Own Posts'] if Conf['Highlight Own Posts']
$.addClass doc, 'highlight-own' $.addClass doc, 'highlight-own'
if Conf['Highlight Posts Quoting You']
$.addClass doc, 'highlight-you'
# Stop there if there's no quotes in that post. # Stop there if there's no quotes in that post.
return unless (quotes = @quotes).length return unless (quotes = @quotes).length
{quotelinks} = @nodes {quotelinks} = @nodes
@ -24,4 +27,5 @@ QuoteYou =
for quotelink in quotelinks for quotelink in quotelinks
if QR.db.get Get.postDataFromLink quotelink if QR.db.get Get.postDataFromLink quotelink
$.add quotelink, $.tn QuoteYou.text $.add quotelink, $.tn QuoteYou.text
$.addClass @nodes.root, 'quotesYou'
return return