diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index aa4754277..f1e29bef7 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -231,7 +231,9 @@ 'Highlight Posts Quoting You': [false, 'Highlights any posts that contain a quote to your post.'], 'Highlight Own Posts': [false, 'Highlights own posts if Quote Markers are enabled.'], 'Quote Threading': [true, 'Thread conversations'], - 'Quote Markers': [true, 'Add "(You)", "(OP)", "(Cross-thread)", "(Dead)" markers to quote links.'] + 'Mark Quotes of You': [true, 'Add \'(You)\' to quotes linking to your posts.'], + 'Mark OP Quotes': [true, 'Add \'(OP)\' to OP quotes.'], + 'Mark Cross-thread Quotes': [true, 'Add \'(Cross-thread)\' to cross-threads quotes.', 'Highlights own posts if Quote Markers are enabled.'] } }, imageExpansion: { @@ -2660,7 +2662,7 @@ $.on(this.pagelist, 'click', this.cb.pageNav); $.on($('#returnlink a', this.navLinks), 'click', function(e) { if (g.VIEW === 'index') { - setIndexMode(Conf['Previous Index Mode']); + Index.setIndexMode(Conf['Previous Index Mode']); e.preventDefault(); return; } @@ -5413,9 +5415,6 @@ QuoteMarkers = { init: function() { - if (!Conf['Quote Markers']) { - return; - } return Post.callbacks.push({ name: 'Quote Markers', cb: this.node @@ -5435,18 +5434,18 @@ _ref = post.isClone ? post.context : post, board = _ref.board, thread = _ref.thread; markers = []; _ref1 = Get.postDataFromLink(quotelink), boardID = _ref1.boardID, threadID = _ref1.threadID, postID = _ref1.postID; - if ((_ref2 = QR.db) != null ? _ref2.get({ + if (Conf['Mark Quotes of You'] && ((_ref2 = QR.db) != null ? _ref2.get({ boardID: boardID, threadID: threadID, postID: postID - }) : void 0) { + }) : void 0)) { markers.push('You'); } if (board.ID === boardID) { - if (thread.ID === postID) { + if (Conf['Mark OP Quotes'] && thread.ID === postID) { markers.push('OP'); } - if (threadID && threadID !== thread.ID) { + if (Conf['Mark Cross-thread Quotes'] && (threadID && threadID !== thread.ID)) { markers.push('Cross-thread'); } } diff --git a/builds/crx/script.js b/builds/crx/script.js index 0e9ab64e2..d9b8ee6da 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -207,7 +207,9 @@ 'Highlight Posts Quoting You': [false, 'Highlights any posts that contain a quote to your post.'], 'Highlight Own Posts': [false, 'Highlights own posts if Quote Markers are enabled.'], 'Quote Threading': [true, 'Thread conversations'], - 'Quote Markers': [true, 'Add "(You)", "(OP)", "(Cross-thread)", "(Dead)" markers to quote links.'] + 'Mark Quotes of You': [true, 'Add \'(You)\' to quotes linking to your posts.'], + 'Mark OP Quotes': [true, 'Add \'(OP)\' to OP quotes.'], + 'Mark Cross-thread Quotes': [true, 'Add \'(Cross-thread)\' to cross-threads quotes.', 'Highlights own posts if Quote Markers are enabled.'] } }, imageExpansion: { @@ -2719,7 +2721,7 @@ $.on(this.pagelist, 'click', this.cb.pageNav); $.on($('#returnlink a', this.navLinks), 'click', function(e) { if (g.VIEW === 'index') { - setIndexMode(Conf['Previous Index Mode']); + Index.setIndexMode(Conf['Previous Index Mode']); e.preventDefault(); return; } @@ -5465,9 +5467,6 @@ QuoteMarkers = { init: function() { - if (!Conf['Quote Markers']) { - return; - } return Post.callbacks.push({ name: 'Quote Markers', cb: this.node @@ -5487,18 +5486,18 @@ _ref = post.isClone ? post.context : post, board = _ref.board, thread = _ref.thread; markers = []; _ref1 = Get.postDataFromLink(quotelink), boardID = _ref1.boardID, threadID = _ref1.threadID, postID = _ref1.postID; - if ((_ref2 = QR.db) != null ? _ref2.get({ + if (Conf['Mark Quotes of You'] && ((_ref2 = QR.db) != null ? _ref2.get({ boardID: boardID, threadID: threadID, postID: postID - }) : void 0) { + }) : void 0)) { markers.push('You'); } if (board.ID === boardID) { - if (thread.ID === postID) { + if (Conf['Mark OP Quotes'] && thread.ID === postID) { markers.push('OP'); } - if (threadID && threadID !== thread.ID) { + if (Conf['Mark Cross-thread Quotes'] && (threadID && threadID !== thread.ID)) { markers.push('Cross-thread'); } } diff --git a/src/General/Config.coffee b/src/General/Config.coffee index 6c88f5a56..6d5945324 100755 --- a/src/General/Config.coffee +++ b/src/General/Config.coffee @@ -367,9 +367,18 @@ Config = true 'Thread conversations' ] - 'Quote Markers': [ + 'Mark Quotes of You': [ true - 'Add "(You)", "(OP)", "(Cross-thread)", "(Dead)" markers to quote links.' + 'Add \'(You)\' to quotes linking to your posts.' + ] + 'Mark OP Quotes': [ + true + 'Add \'(OP)\' to OP quotes.' + ] + 'Mark Cross-thread Quotes': [ + true + 'Add \'(Cross-thread)\' to cross-threads quotes.' + 'Highlights own posts if Quote Markers are enabled.' ] imageExpansion: 'Fit width': [ diff --git a/src/Quotelinks/QuoteMarkers.coffee b/src/Quotelinks/QuoteMarkers.coffee index 647df71cd..d4fea3ad2 100644 --- a/src/Quotelinks/QuoteMarkers.coffee +++ b/src/Quotelinks/QuoteMarkers.coffee @@ -1,7 +1,5 @@ QuoteMarkers = init: -> - return if !Conf['Quote Markers'] - Post.callbacks.push name: 'Quote Markers' cb: @node @@ -17,14 +15,14 @@ QuoteMarkers = markers = [] {boardID, threadID, postID} = Get.postDataFromLink quotelink - if QR.db?.get {boardID, threadID, postID} + if Conf['Mark Quotes of You'] and QR.db?.get {boardID, threadID, postID} markers.push 'You' if board.ID is boardID - if thread.ID is postID + if Conf['Mark OP Quotes'] and thread.ID is postID markers.push 'OP' - if threadID and threadID isnt thread.ID # threadID is 0 for deadlinks + if Conf['Mark Cross-thread Quotes'] and (threadID and threadID isnt thread.ID) # threadID is 0 for deadlinks markers.push 'Cross-thread' if $.hasClass quotelink, 'deadlink'