diff --git a/builds/4chan-X.js b/builds/4chan-X.js index 87cd5781c..79b439161 100644 --- a/builds/4chan-X.js +++ b/builds/4chan-X.js @@ -209,6 +209,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.'], @@ -7748,7 +7749,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; @@ -9764,7 +9765,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 = {}; @@ -9833,14 +9834,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/4chan-X.user.js b/builds/4chan-X.user.js index 056299b26..e3fadd634 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -210,6 +210,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.'], @@ -7757,7 +7758,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; @@ -9775,7 +9776,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 = {}; @@ -9844,14 +9845,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 b98ba229a..58128291b 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -191,6 +191,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.'], @@ -7735,7 +7736,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 = ''; @@ -9756,7 +9757,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 = {}; @@ -9825,14 +9826,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 294dfc5aa..f8d3424ec 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 885f67339..cc971b805 100644 --- a/src/General/Settings.coffee +++ b/src/General/Settings.coffee @@ -311,7 +311,7 @@ Settings = section.innerHTML = """ <%= grunt.file.read('src/General/html/Settings/Advanced.html').replace(/>\s+<').trim() %> """ - items = {} + items = {} inputs = {} for name in ['boardnav', 'time', 'backlink', 'fileInfo', 'favicon', 'sageEmoji', 'emojiPos', 'usercss'] input = $ "[name=#{name}]", section @@ -346,14 +346,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 = [] @@ -361,7 +360,6 @@ Settings = row = $.el 'tr', className: "board-#{boardID}" row.hidden = boardID isnt g.BOARD.ID - rows.push row boardOptions.push $.el 'option', textContent: "/#{boardID}/" @@ -369,11 +367,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