Separate Quote Markers into options again.
Still better than it was in terms of code, tho
This commit is contained in:
parent
a821a01fbe
commit
0e68fe013f
@ -231,7 +231,9 @@
|
|||||||
'Highlight Posts Quoting You': [false, 'Highlights any posts that contain a quote to your post.'],
|
'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.'],
|
'Highlight Own Posts': [false, 'Highlights own posts if Quote Markers are enabled.'],
|
||||||
'Quote Threading': [true, 'Thread conversations'],
|
'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: {
|
imageExpansion: {
|
||||||
@ -2660,7 +2662,7 @@
|
|||||||
$.on(this.pagelist, 'click', this.cb.pageNav);
|
$.on(this.pagelist, 'click', this.cb.pageNav);
|
||||||
$.on($('#returnlink a', this.navLinks), 'click', function(e) {
|
$.on($('#returnlink a', this.navLinks), 'click', function(e) {
|
||||||
if (g.VIEW === 'index') {
|
if (g.VIEW === 'index') {
|
||||||
setIndexMode(Conf['Previous Index Mode']);
|
Index.setIndexMode(Conf['Previous Index Mode']);
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -5413,9 +5415,6 @@
|
|||||||
|
|
||||||
QuoteMarkers = {
|
QuoteMarkers = {
|
||||||
init: function() {
|
init: function() {
|
||||||
if (!Conf['Quote Markers']) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
return Post.callbacks.push({
|
return Post.callbacks.push({
|
||||||
name: 'Quote Markers',
|
name: 'Quote Markers',
|
||||||
cb: this.node
|
cb: this.node
|
||||||
@ -5435,18 +5434,18 @@
|
|||||||
_ref = post.isClone ? post.context : post, board = _ref.board, thread = _ref.thread;
|
_ref = post.isClone ? post.context : post, board = _ref.board, thread = _ref.thread;
|
||||||
markers = [];
|
markers = [];
|
||||||
_ref1 = Get.postDataFromLink(quotelink), boardID = _ref1.boardID, threadID = _ref1.threadID, postID = _ref1.postID;
|
_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,
|
boardID: boardID,
|
||||||
threadID: threadID,
|
threadID: threadID,
|
||||||
postID: postID
|
postID: postID
|
||||||
}) : void 0) {
|
}) : void 0)) {
|
||||||
markers.push('You');
|
markers.push('You');
|
||||||
}
|
}
|
||||||
if (board.ID === boardID) {
|
if (board.ID === boardID) {
|
||||||
if (thread.ID === postID) {
|
if (Conf['Mark OP Quotes'] && thread.ID === postID) {
|
||||||
markers.push('OP');
|
markers.push('OP');
|
||||||
}
|
}
|
||||||
if (threadID && threadID !== thread.ID) {
|
if (Conf['Mark Cross-thread Quotes'] && (threadID && threadID !== thread.ID)) {
|
||||||
markers.push('Cross-thread');
|
markers.push('Cross-thread');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -207,7 +207,9 @@
|
|||||||
'Highlight Posts Quoting You': [false, 'Highlights any posts that contain a quote to your post.'],
|
'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.'],
|
'Highlight Own Posts': [false, 'Highlights own posts if Quote Markers are enabled.'],
|
||||||
'Quote Threading': [true, 'Thread conversations'],
|
'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: {
|
imageExpansion: {
|
||||||
@ -2719,7 +2721,7 @@
|
|||||||
$.on(this.pagelist, 'click', this.cb.pageNav);
|
$.on(this.pagelist, 'click', this.cb.pageNav);
|
||||||
$.on($('#returnlink a', this.navLinks), 'click', function(e) {
|
$.on($('#returnlink a', this.navLinks), 'click', function(e) {
|
||||||
if (g.VIEW === 'index') {
|
if (g.VIEW === 'index') {
|
||||||
setIndexMode(Conf['Previous Index Mode']);
|
Index.setIndexMode(Conf['Previous Index Mode']);
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -5465,9 +5467,6 @@
|
|||||||
|
|
||||||
QuoteMarkers = {
|
QuoteMarkers = {
|
||||||
init: function() {
|
init: function() {
|
||||||
if (!Conf['Quote Markers']) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
return Post.callbacks.push({
|
return Post.callbacks.push({
|
||||||
name: 'Quote Markers',
|
name: 'Quote Markers',
|
||||||
cb: this.node
|
cb: this.node
|
||||||
@ -5487,18 +5486,18 @@
|
|||||||
_ref = post.isClone ? post.context : post, board = _ref.board, thread = _ref.thread;
|
_ref = post.isClone ? post.context : post, board = _ref.board, thread = _ref.thread;
|
||||||
markers = [];
|
markers = [];
|
||||||
_ref1 = Get.postDataFromLink(quotelink), boardID = _ref1.boardID, threadID = _ref1.threadID, postID = _ref1.postID;
|
_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,
|
boardID: boardID,
|
||||||
threadID: threadID,
|
threadID: threadID,
|
||||||
postID: postID
|
postID: postID
|
||||||
}) : void 0) {
|
}) : void 0)) {
|
||||||
markers.push('You');
|
markers.push('You');
|
||||||
}
|
}
|
||||||
if (board.ID === boardID) {
|
if (board.ID === boardID) {
|
||||||
if (thread.ID === postID) {
|
if (Conf['Mark OP Quotes'] && thread.ID === postID) {
|
||||||
markers.push('OP');
|
markers.push('OP');
|
||||||
}
|
}
|
||||||
if (threadID && threadID !== thread.ID) {
|
if (Conf['Mark Cross-thread Quotes'] && (threadID && threadID !== thread.ID)) {
|
||||||
markers.push('Cross-thread');
|
markers.push('Cross-thread');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -367,9 +367,18 @@ Config =
|
|||||||
true
|
true
|
||||||
'Thread conversations'
|
'Thread conversations'
|
||||||
]
|
]
|
||||||
'Quote Markers': [
|
'Mark Quotes of You': [
|
||||||
true
|
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:
|
imageExpansion:
|
||||||
'Fit width': [
|
'Fit width': [
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
QuoteMarkers =
|
QuoteMarkers =
|
||||||
init: ->
|
init: ->
|
||||||
return if !Conf['Quote Markers']
|
|
||||||
|
|
||||||
Post.callbacks.push
|
Post.callbacks.push
|
||||||
name: 'Quote Markers'
|
name: 'Quote Markers'
|
||||||
cb: @node
|
cb: @node
|
||||||
@ -17,14 +15,14 @@ QuoteMarkers =
|
|||||||
markers = []
|
markers = []
|
||||||
{boardID, threadID, postID} = Get.postDataFromLink quotelink
|
{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'
|
markers.push 'You'
|
||||||
|
|
||||||
if board.ID is boardID
|
if board.ID is boardID
|
||||||
if thread.ID is postID
|
if Conf['Mark OP Quotes'] and thread.ID is postID
|
||||||
markers.push 'OP'
|
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'
|
markers.push 'Cross-thread'
|
||||||
|
|
||||||
if $.hasClass quotelink, 'deadlink'
|
if $.hasClass quotelink, 'deadlink'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user