Separate 'Remember Your Posts' from 'Mark Quotes of You'. #674
This commit is contained in:
parent
45dac609db
commit
14298e1e30
@ -544,9 +544,14 @@ Config =
|
|||||||
true
|
true
|
||||||
'Link dead quotes to the archives.'
|
'Link dead quotes to the archives.'
|
||||||
]
|
]
|
||||||
|
'Remember Your Posts': [
|
||||||
|
true
|
||||||
|
'Remember your posting history.'
|
||||||
|
]
|
||||||
'Mark Quotes of You': [
|
'Mark Quotes of You': [
|
||||||
true
|
true
|
||||||
'Add \'(You)\' to quotes linking to your posts.'
|
'Add \'(You)\' to quotes linking to your posts.'
|
||||||
|
1
|
||||||
]
|
]
|
||||||
'Highlight Posts Quoting You': [
|
'Highlight Posts Quoting You': [
|
||||||
true
|
true
|
||||||
@ -555,7 +560,7 @@ Config =
|
|||||||
]
|
]
|
||||||
'Highlight Own Posts': [
|
'Highlight Own Posts': [
|
||||||
true
|
true
|
||||||
'Highlights own posts if Mark Quotes of You is enabled.'
|
'Highlights own posts.'
|
||||||
1
|
1
|
||||||
]
|
]
|
||||||
'Mark OP Quotes': [
|
'Mark OP Quotes': [
|
||||||
|
|||||||
@ -339,6 +339,9 @@ Settings =
|
|||||||
if compareString < '00001.00011.00020.00004' or compareString is '00001.00011.00021.00000'
|
if compareString < '00001.00011.00020.00004' or compareString is '00001.00011.00021.00000'
|
||||||
if data['sauces']?
|
if data['sauces']?
|
||||||
changes['sauces'] = (changes['sauces'] ? data['sauces']).replace /^#?\s*https:\/\/www\.google\.com\/searchbyimage\?image_url=%(?:IMG|URL)(?=$|;)/mg, '$&%3Fs.jpg'
|
changes['sauces'] = (changes['sauces'] ? data['sauces']).replace /^#?\s*https:\/\/www\.google\.com\/searchbyimage\?image_url=%(?:IMG|URL)(?=$|;)/mg, '$&%3Fs.jpg'
|
||||||
|
if compareString < '00001.00011.00021.00003'
|
||||||
|
unless data['Remember Your Posts']?
|
||||||
|
changes['Remember Your Posts'] = data['Mark Quotes of You'] ? true
|
||||||
changes
|
changes
|
||||||
|
|
||||||
loadSettings: (data, cb) ->
|
loadSettings: (data, cb) ->
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
PostSuccessful =
|
PostSuccessful =
|
||||||
init: ->
|
init: ->
|
||||||
return unless Conf['Mark Quotes of You']
|
return unless Conf['Remember Your Posts']
|
||||||
$.ready @ready
|
$.ready @ready
|
||||||
|
|
||||||
ready: ->
|
ready: ->
|
||||||
|
|||||||
@ -24,8 +24,8 @@ QR =
|
|||||||
init: ->
|
init: ->
|
||||||
return unless Conf['Quick Reply']
|
return unless Conf['Quick Reply']
|
||||||
|
|
||||||
if Conf['Mark Quotes of You']
|
if Conf['Remember Your Posts']
|
||||||
$.sync 'Mark Quotes of You', (enabled) -> Conf['Mark Quotes of You'] = enabled
|
$.sync 'Remember Your Posts', (enabled) -> Conf['Remember Your Posts'] = enabled
|
||||||
@db = new DataBoard 'yourPosts'
|
@db = new DataBoard 'yourPosts'
|
||||||
|
|
||||||
@posts = []
|
@posts = []
|
||||||
@ -769,8 +769,8 @@ QR =
|
|||||||
threadID = +threadID or postID
|
threadID = +threadID or postID
|
||||||
isReply = threadID isnt postID
|
isReply = threadID isnt postID
|
||||||
|
|
||||||
$.forceSync 'Mark Quotes of You'
|
$.forceSync 'Remember Your Posts'
|
||||||
if Conf['Mark Quotes of You']
|
if Conf['Remember Your Posts']
|
||||||
QR.db?.set
|
QR.db?.set
|
||||||
boardID: g.BOARD.ID
|
boardID: g.BOARD.ID
|
||||||
threadID: threadID
|
threadID: threadID
|
||||||
|
|||||||
@ -22,7 +22,7 @@ QuoteBacklink =
|
|||||||
cb: @secondNode
|
cb: @secondNode
|
||||||
firstNode: ->
|
firstNode: ->
|
||||||
return if @isClone or !@quotes.length or @isRebuilt
|
return if @isClone or !@quotes.length or @isRebuilt
|
||||||
markYours = QR.db?.get {boardID: @board.ID, threadID: @thread.ID, postID: @ID}
|
markYours = Conf['Mark Quotes of You'] and QR.db?.get {boardID: @board.ID, threadID: @thread.ID, postID: @ID}
|
||||||
a = $.el 'a',
|
a = $.el 'a',
|
||||||
href: Build.postURL @board.ID, @thread.ID, @ID
|
href: Build.postURL @board.ID, @thread.ID, @ID
|
||||||
className: if @isHidden then 'filtered backlink' else 'backlink'
|
className: if @isHidden then 'filtered backlink' else 'backlink'
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
QuoteYou =
|
QuoteYou =
|
||||||
init: ->
|
init: ->
|
||||||
return unless g.VIEW in ['index', 'thread'] and Conf['Mark Quotes of You'] and Conf['Quick Reply']
|
return unless g.VIEW in ['index', 'thread'] and Conf['Remember Your Posts'] and Conf['Quick Reply']
|
||||||
|
|
||||||
if Conf['Highlight Own Posts']
|
if Conf['Highlight Own Posts']
|
||||||
$.addClass doc, 'highlight-own'
|
$.addClass doc, 'highlight-own'
|
||||||
@ -27,7 +27,7 @@ QuoteYou =
|
|||||||
return unless @quotes.length
|
return unless @quotes.length
|
||||||
|
|
||||||
for quotelink in @nodes.quotelinks when QR.db.get Get.postDataFromLink quotelink
|
for quotelink in @nodes.quotelinks when QR.db.get Get.postDataFromLink quotelink
|
||||||
$.add quotelink, $.tn QuoteYou.text
|
$.add quotelink, $.tn QuoteYou.text if Conf['Mark Quotes of You']
|
||||||
$.addClass quotelink, 'you'
|
$.addClass quotelink, 'you'
|
||||||
$.addClass @nodes.root, 'quotesYou'
|
$.addClass @nodes.root, 'quotesYou'
|
||||||
return
|
return
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user