diff --git a/builds/appchan-x.user.js b/builds/appchan-x.user.js index fa343a89d..24c2139b5 100644 --- a/builds/appchan-x.user.js +++ b/builds/appchan-x.user.js @@ -5937,7 +5937,7 @@ } filter = filter.replace(regexp[0], ''); boards = ((_ref1 = filter.match(/boards:([^;]+)/)) != null ? _ref1[1].toLowerCase() : void 0) || 'global'; - if (boards !== 'global' && (_ref2 = !g.BOARD.ID, __indexOf.call(boards.split(','), _ref2) >= 0)) { + if (boards !== 'global' && (_ref2 = g.BOARD.ID, __indexOf.call(boards.split(','), _ref2) < 0)) { continue; } if (key === 'uniqueID' || key === 'MD5') { @@ -8425,7 +8425,7 @@ _ref = match, match = _ref[0], type = _ref[1], val = _ref[2]; item = item.replace(match, ''); boards = ((_ref1 = item.match(/boards:([^;]+)/i)) != null ? _ref1[1].toLowerCase() : void 0) || 'global'; - if (boards !== 'global' && (_ref2 = !g.BOARD.ID, __indexOf.call(boards.split(','), _ref2) >= 0)) { + if (boards !== 'global' && (_ref2 = g.BOARD.ID, __indexOf.call(boards.split(','), _ref2) < 0)) { return; } if (type === 'password') { @@ -8772,7 +8772,7 @@ QR.nodes.filename.focus(); return; } - if (e.target.nodeName === 'INPUT' || (e.keyCode && ((_ref = !e.keyCode) === 32 || _ref === 13)) || e.ctrlKey) { + if (e.target.nodeName === 'INPUT' || (e.keyCode && ((_ref = e.keyCode) !== 32 && _ref !== 13)) || e.ctrlKey) { return; } e.preventDefault(); @@ -12298,7 +12298,7 @@ file: {} }, init: function() { - var archive, boardID, boards, data, id, name, type, _i, _len, _ref, _ref1, _ref2, _ref3; + var archive, boardID, boards, data, id, name, type, _i, _len, _ref, _ref1, _ref2; _ref = Conf['selectedArchives']; for (boardID in _ref) { @@ -12326,7 +12326,7 @@ if (!(boardID in Redirect.data.post || archive.software !== 'foolfuuka')) { Redirect.data.post[boardID] = archive; } - if (!(boardID in Redirect.data.file || (_ref3 = !boardID, __indexOf.call(archive.files, _ref3) >= 0))) { + if (!(boardID in Redirect.data.file || __indexOf.call(archive.files, boardID) < 0)) { Redirect.data.file[boardID] = archive; } } @@ -14161,7 +14161,7 @@ _ref = $$("#board-list a:not(.catalog), #boardNavDesktopFoot a"); for (_i = 0, _len = _ref.length; _i < _len; _i++) { a = _ref[_i]; - if (((_ref1 = !a.hostname) === 'boards.4chan.org' || _ref1 === 'catalog.neet.tv' || _ref1 === '4index.gropes.us') || !(board = a.pathname.split('/')[1]) || (board === 'f' || board === 'status' || board === '4chan')) { + if (((_ref1 = a.hostname) !== 'boards.4chan.org' && _ref1 !== 'catalog.neet.tv' && _ref1 !== '4index.gropes.us') || !(board = a.pathname.split('/')[1]) || (board === 'f' || board === 'status' || board === '4chan')) { continue; } a.href = generateURL(board); diff --git a/builds/crx/script.js b/builds/crx/script.js index 587bfa53e..71a9691ae 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -5941,7 +5941,7 @@ } filter = filter.replace(regexp[0], ''); boards = ((_ref1 = filter.match(/boards:([^;]+)/)) != null ? _ref1[1].toLowerCase() : void 0) || 'global'; - if (boards !== 'global' && (_ref2 = !g.BOARD.ID, __indexOf.call(boards.split(','), _ref2) >= 0)) { + if (boards !== 'global' && (_ref2 = g.BOARD.ID, __indexOf.call(boards.split(','), _ref2) < 0)) { continue; } if (key === 'uniqueID' || key === 'MD5') { @@ -8434,7 +8434,7 @@ _ref = match, match = _ref[0], type = _ref[1], val = _ref[2]; item = item.replace(match, ''); boards = ((_ref1 = item.match(/boards:([^;]+)/i)) != null ? _ref1[1].toLowerCase() : void 0) || 'global'; - if (boards !== 'global' && (_ref2 = !g.BOARD.ID, __indexOf.call(boards.split(','), _ref2) >= 0)) { + if (boards !== 'global' && (_ref2 = g.BOARD.ID, __indexOf.call(boards.split(','), _ref2) < 0)) { return; } if (type === 'password') { @@ -8781,7 +8781,7 @@ QR.nodes.filename.focus(); return; } - if (e.target.nodeName === 'INPUT' || (e.keyCode && ((_ref = !e.keyCode) === 32 || _ref === 13)) || e.ctrlKey) { + if (e.target.nodeName === 'INPUT' || (e.keyCode && ((_ref = e.keyCode) !== 32 && _ref !== 13)) || e.ctrlKey) { return; } e.preventDefault(); @@ -12288,7 +12288,7 @@ file: {} }, init: function() { - var archive, boardID, boards, data, id, name, type, _i, _len, _ref, _ref1, _ref2, _ref3; + var archive, boardID, boards, data, id, name, type, _i, _len, _ref, _ref1, _ref2; _ref = Conf['selectedArchives']; for (boardID in _ref) { @@ -12316,7 +12316,7 @@ if (!(boardID in Redirect.data.post || archive.software !== 'foolfuuka')) { Redirect.data.post[boardID] = archive; } - if (!(boardID in Redirect.data.file || (_ref3 = !boardID, __indexOf.call(archive.files, _ref3) >= 0))) { + if (!(boardID in Redirect.data.file || __indexOf.call(archive.files, boardID) < 0)) { Redirect.data.file[boardID] = archive; } } @@ -14151,7 +14151,7 @@ _ref = $$("#board-list a:not(.catalog), #boardNavDesktopFoot a"); for (_i = 0, _len = _ref.length; _i < _len; _i++) { a = _ref[_i]; - if (((_ref1 = !a.hostname) === 'boards.4chan.org' || _ref1 === 'catalog.neet.tv' || _ref1 === '4index.gropes.us') || !(board = a.pathname.split('/')[1]) || (board === 'f' || board === 'status' || board === '4chan')) { + if (((_ref1 = a.hostname) !== 'boards.4chan.org' && _ref1 !== 'catalog.neet.tv' && _ref1 !== '4index.gropes.us') || !(board = a.pathname.split('/')[1]) || (board === 'f' || board === 'status' || board === '4chan')) { continue; } a.href = generateURL(board); diff --git a/src/Archive/Redirect.coffee b/src/Archive/Redirect.coffee index b4aa7137b..b6451c6fa 100755 --- a/src/Archive/Redirect.coffee +++ b/src/Archive/Redirect.coffee @@ -17,7 +17,7 @@ Redirect = Redirect.data.thread[boardID] = archive unless boardID of Redirect.data.post or archive.software isnt 'foolfuuka' Redirect.data.post[boardID] = archive - unless boardID of Redirect.data.file or not boardID in archive.files + unless boardID of Redirect.data.file or boardID not in archive.files Redirect.data.file[boardID] = archive return diff --git a/src/Filtering/Filter.coffee b/src/Filtering/Filter.coffee index e6a8bd27f..934a5fa5f 100755 --- a/src/Filtering/Filter.coffee +++ b/src/Filtering/Filter.coffee @@ -21,7 +21,7 @@ Filter = # and it's not specifically applicable to the current board. # Defaults to global. boards = filter.match(/boards:([^;]+)/)?[1].toLowerCase() or 'global' - if boards isnt 'global' and not g.BOARD.ID in boards.split ',' + if boards isnt 'global' and g.BOARD.ID not in boards.split ',' continue if key in ['uniqueID', 'MD5'] diff --git a/src/Miscellaneous/CatalogLinks.coffee b/src/Miscellaneous/CatalogLinks.coffee index 263d4fc06..ba5af43e4 100755 --- a/src/Miscellaneous/CatalogLinks.coffee +++ b/src/Miscellaneous/CatalogLinks.coffee @@ -34,7 +34,7 @@ CatalogLinks = (board) -> a.href = "/#{board}/#{path}" for a in $$ """#board-list a:not(.catalog), #boardNavDesktopFoot a""" - continue if not a.hostname in ['boards.4chan.org', 'catalog.neet.tv', '4index.gropes.us'] or + continue if a.hostname not in ['boards.4chan.org', 'catalog.neet.tv', '4index.gropes.us'] or !(board = a.pathname.split('/')[1]) or board in ['f', 'status', '4chan'] diff --git a/src/Posting/QuickReply.coffee b/src/Posting/QuickReply.coffee index 1a5f0da96..e7a7aced0 100644 --- a/src/Posting/QuickReply.coffee +++ b/src/Posting/QuickReply.coffee @@ -228,7 +228,7 @@ QR = item = item.replace match, '' boards = item.match(/boards:([^;]+)/i)?[1].toLowerCase() or 'global' - return if boards isnt 'global' and not g.BOARD.ID in boards.split ',' + return if boards isnt 'global' and g.BOARD.ID not in boards.split ',' if type is 'password' QR.persona.pwd = val @@ -492,7 +492,7 @@ QR = $.addClass QR.nodes.filename, 'edit' QR.nodes.filename.focus() return - return if e.target.nodeName is 'INPUT' or (e.keyCode and not e.keyCode in [32, 13]) or e.ctrlKey + return if e.target.nodeName is 'INPUT' or (e.keyCode and e.keyCode not in [32, 13]) or e.ctrlKey e.preventDefault() QR.nodes.fileInput.click()