diff --git a/builds/appchan-x.js b/builds/appchan-x.js index 91d251c49..3b54308d7 100644 --- a/builds/appchan-x.js +++ b/builds/appchan-x.js @@ -215,6 +215,7 @@ 'Quote Highlighting': [true, 'Highlight the previewed post.'], 'Resurrect Quotes': [true, 'Link dead quotes to the archives.'], 'Mark Quotes of You': [true, 'Add \'(You)\' to quotes linking to your posts.'], + 'Quoted Title': ['Change the page title to reflect you\'ve been quoted.', false], 'Highlight Posts Quoting You': [false, 'Highlights any posts that contain a quote to your post.'], 'Highlight Own Posts': [false, 'Highlights own posts if Mark Quotes of You is enabled.'], 'Mark OP Quotes': [true, 'Add \'(OP)\' to OP quotes.'], @@ -10029,7 +10030,7 @@ count = Unread.posts.length; if (Conf['Unread Count']) { - d.title = "" + (count || !Conf['Hide Unread Count at (0)'] ? "(" + count + ") " : '') + (g.DEAD ? "/" + g.BOARD + "/ - 404" : "" + Unread.title); + d.title = "" + (Conf['Quoted Title'] && Unread.postsQuotingYou.length ? '(!) ' : '') + (count || !Conf['Hide Unread Count at (0)'] ? "(" + count + ") " : '') + (g.DEAD ? "/" + g.BOARD + "/ - 404" : "" + Unread.title); } if (!Conf['Unread Favicon']) { return; @@ -13666,7 +13667,7 @@ return $.on(ta, 'change', $.cb.value); }, advanced: function(section) { - var archive, boardID, boardOptions, boardSelect, boards, data, event, input, inputs, items, name, row, rows, ta, table, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _ref3; + var archive, boardID, boardOptions, boardSelect, boards, data, event, input, inputs, item, items, name, row, rows, ta, table, _i, _j, _k, _l, _len, _len1, _len2, _len3, _ref, _ref1, _ref2, _ref3, _ref4; section.innerHTML = "
"; items = {}; @@ -13736,14 +13737,18 @@ className: "board-" + boardID }); row.hidden = boardID !== g.BOARD.ID; - rows.push(row); boardOptions.push($.el('option', { textContent: "/" + boardID + "/", value: "board-" + boardID, selected: boardID === g.BOARD.ID })); data = boards[boardID]; - $.add(row, [Settings.addArchiveCell(boardID, data, 'thread'), Settings.addArchiveCell(boardID, data, 'post'), Settings.addArchiveCell(boardID, data, 'file')]); + _ref4 = ['thread', 'post', 'file']; + for (_l = 0, _len3 = _ref4.length; _l < _len3; _l++) { + item = _ref4[_l]; + $.add(row, Settings.addArchiveCell(boardID, data, item)); + } + rows.push(row); } $.add($('tbody', section), rows); boardSelect = $('#archive-board-select', section); diff --git a/builds/appchan-x.user.js b/builds/appchan-x.user.js index fce8ed76c..0143feea0 100644 --- a/builds/appchan-x.user.js +++ b/builds/appchan-x.user.js @@ -216,6 +216,7 @@ 'Quote Highlighting': [true, 'Highlight the previewed post.'], 'Resurrect Quotes': [true, 'Link dead quotes to the archives.'], 'Mark Quotes of You': [true, 'Add \'(You)\' to quotes linking to your posts.'], + 'Quoted Title': ['Change the page title to reflect you\'ve been quoted.', false], 'Highlight Posts Quoting You': [false, 'Highlights any posts that contain a quote to your post.'], 'Highlight Own Posts': [false, 'Highlights own posts if Mark Quotes of You is enabled.'], 'Mark OP Quotes': [true, 'Add \'(OP)\' to OP quotes.'], @@ -10038,7 +10039,7 @@ count = Unread.posts.length; if (Conf['Unread Count']) { - d.title = "" + (count || !Conf['Hide Unread Count at (0)'] ? "(" + count + ") " : '') + (g.DEAD ? "/" + g.BOARD + "/ - 404" : "" + Unread.title); + d.title = "" + (Conf['Quoted Title'] && Unread.postsQuotingYou.length ? '(!) ' : '') + (count || !Conf['Hide Unread Count at (0)'] ? "(" + count + ") " : '') + (g.DEAD ? "/" + g.BOARD + "/ - 404" : "" + Unread.title); } if (!Conf['Unread Favicon']) { return; @@ -13673,7 +13674,7 @@ return $.on(ta, 'change', $.cb.value); }, advanced: function(section) { - var archive, boardID, boardOptions, boardSelect, boards, data, event, input, inputs, items, name, row, rows, ta, table, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _ref3; + var archive, boardID, boardOptions, boardSelect, boards, data, event, input, inputs, item, items, name, row, rows, ta, table, _i, _j, _k, _l, _len, _len1, _len2, _len3, _ref, _ref1, _ref2, _ref3, _ref4; section.innerHTML = ""; items = {}; @@ -13743,14 +13744,18 @@ className: "board-" + boardID }); row.hidden = boardID !== g.BOARD.ID; - rows.push(row); boardOptions.push($.el('option', { textContent: "/" + boardID + "/", value: "board-" + boardID, selected: boardID === g.BOARD.ID })); data = boards[boardID]; - $.add(row, [Settings.addArchiveCell(boardID, data, 'thread'), Settings.addArchiveCell(boardID, data, 'post'), Settings.addArchiveCell(boardID, data, 'file')]); + _ref4 = ['thread', 'post', 'file']; + for (_l = 0, _len3 = _ref4.length; _l < _len3; _l++) { + item = _ref4[_l]; + $.add(row, Settings.addArchiveCell(boardID, data, item)); + } + rows.push(row); } $.add($('tbody', section), rows); boardSelect = $('#archive-board-select', section); diff --git a/builds/crx/script.js b/builds/crx/script.js index cddf18062..0e78c05db 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -196,6 +196,7 @@ 'Quote Highlighting': [true, 'Highlight the previewed post.'], 'Resurrect Quotes': [true, 'Link dead quotes to the archives.'], 'Mark Quotes of You': [true, 'Add \'(You)\' to quotes linking to your posts.'], + 'Quoted Title': ['Change the page title to reflect you\'ve been quoted.', false], 'Highlight Posts Quoting You': [false, 'Highlights any posts that contain a quote to your post.'], 'Highlight Own Posts': [false, 'Highlights own posts if Mark Quotes of You is enabled.'], 'Mark OP Quotes': [true, 'Add \'(OP)\' to OP quotes.'], @@ -10015,7 +10016,7 @@ count = Unread.posts.length; if (Conf['Unread Count']) { - d.title = "" + (count || !Conf['Hide Unread Count at (0)'] ? "(" + count + ") " : '') + (g.DEAD ? "/" + g.BOARD + "/ - 404" : "" + Unread.title); + d.title = "" + (Conf['Quoted Title'] && Unread.postsQuotingYou.length ? '(!) ' : '') + (count || !Conf['Hide Unread Count at (0)'] ? "(" + count + ") " : '') + (g.DEAD ? "/" + g.BOARD + "/ - 404" : "" + Unread.title); if (!dontrepeat) { setTimeout(function() { d.title = ''; @@ -13657,7 +13658,7 @@ return $.on(ta, 'change', $.cb.value); }, advanced: function(section) { - var archive, boardID, boardOptions, boardSelect, boards, data, event, input, inputs, items, name, row, rows, ta, table, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _ref3; + var archive, boardID, boardOptions, boardSelect, boards, data, event, input, inputs, item, items, name, row, rows, ta, table, _i, _j, _k, _l, _len, _len1, _len2, _len3, _ref, _ref1, _ref2, _ref3, _ref4; section.innerHTML = ""; items = {}; @@ -13727,14 +13728,18 @@ className: "board-" + boardID }); row.hidden = boardID !== g.BOARD.ID; - rows.push(row); boardOptions.push($.el('option', { textContent: "/" + boardID + "/", value: "board-" + boardID, selected: boardID === g.BOARD.ID })); data = boards[boardID]; - $.add(row, [Settings.addArchiveCell(boardID, data, 'thread'), Settings.addArchiveCell(boardID, data, 'post'), Settings.addArchiveCell(boardID, data, 'file')]); + _ref4 = ['thread', 'post', 'file']; + for (_l = 0, _len3 = _ref4.length; _l < _len3; _l++) { + item = _ref4[_l]; + $.add(row, Settings.addArchiveCell(boardID, data, item)); + } + rows.push(row); } $.add($('tbody', section), rows); boardSelect = $('#archive-board-select', section); diff --git a/src/General/Config.coffee b/src/General/Config.coffee index fc0a784f5..bd7671446 100644 --- a/src/General/Config.coffee +++ b/src/General/Config.coffee @@ -331,6 +331,10 @@ Config = true 'Add \'(You)\' to quotes linking to your posts.' ] + 'Quoted Title': [ + 'Change the page title to reflect you\'ve been quoted.' + false + ] 'Highlight Posts Quoting You': [ false 'Highlights any posts that contain a quote to your post.' diff --git a/src/General/Settings.coffee b/src/General/Settings.coffee index d455d9c7f..ca69b3c00 100644 --- a/src/General/Settings.coffee +++ b/src/General/Settings.coffee @@ -308,14 +308,13 @@ Settings = boards = {} for name, archive of Redirect.archives for boardID in archive.boards - data = boards[boardID] or= { + data = boards[boardID] or= thread: [] post: [] file: [] - } data.thread.push name - data.post.push name if archive.software is 'foolfuuka' - data.file.push name if archive.files.contains boardID + data.post.push name if archive.software is 'foolfuuka' + data.file.push name if archive.files.contains boardID rows = [] boardOptions = [] @@ -323,7 +322,6 @@ Settings = row = $.el 'tr', className: "board-#{boardID}" row.hidden = boardID isnt g.BOARD.ID - rows.push row boardOptions.push $.el 'option', textContent: "/#{boardID}/" @@ -331,11 +329,9 @@ Settings = selected: boardID is g.BOARD.ID data = boards[boardID] - $.add row, [ - Settings.addArchiveCell boardID, data, 'thread' - Settings.addArchiveCell boardID, data, 'post' - Settings.addArchiveCell boardID, data, 'file' - ] + $.add row, Settings.addArchiveCell boardID, data, item for item in ['thread', 'post', 'file'] + rows.push row + $.add $('tbody', section), rows boardSelect = $('#archive-board-select', section) diff --git a/src/Monitoring/Unread.coffee b/src/Monitoring/Unread.coffee index 75415b7e5..286656056 100644 --- a/src/Monitoring/Unread.coffee +++ b/src/Monitoring/Unread.coffee @@ -151,7 +151,7 @@ Unread = count = Unread.posts.length if Conf['Unread Count'] - d.title = "#{if count or !Conf['Hide Unread Count at (0)'] then "(#{count}) " else ''}#{if g.DEAD then "/#{g.BOARD}/ - 404" else "#{Unread.title}"}" + d.title = "#{if Conf['Quoted Title'] and Unread.postsQuotingYou.length then '(!) ' else ''}#{if count or !Conf['Hide Unread Count at (0)'] then "(#{count}) " else ''}#{if g.DEAD then "/#{g.BOARD}/ - 404" else "#{Unread.title}"}" <% if (type === 'crx') { %> # XXX Chrome bug where it doesn't always update the tab title. # crbug.com/124381