diff --git a/LICENSE b/LICENSE index 89cf331f1..b9519e8f3 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ /* -* appchan x - Version 2.8.0 - 2014-01-11 +* appchan x - Version 2.8.0 - 2014-01-12 * * Licensed under the MIT license. * https://github.com/zixaphir/appchan-x/blob/master/LICENSE diff --git a/builds/appchan-x.user.js b/builds/appchan-x.user.js index 1b2c82f0c..4bea2d51e 100644 --- a/builds/appchan-x.user.js +++ b/builds/appchan-x.user.js @@ -22,7 +22,7 @@ // ==/UserScript== /* -* appchan x - Version 2.8.0 - 2014-01-11 +* appchan x - Version 2.8.0 - 2014-01-12 * * Licensed under the MIT license. * https://github.com/zixaphir/appchan-x/blob/master/LICENSE @@ -12350,7 +12350,7 @@ if (!((archive = archives[id]))) { continue; } - boards = type === 'file' ? archive.file : archive.boards; + boards = type === 'file' ? archive.files : archive.boards; if (__indexOf.call(boards, boardID) < 0) { continue; } @@ -16360,8 +16360,8 @@ return $.on(ta, 'change', $.cb.value); }, advanced: function(section) { - 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 = "
"; + var archBoards, boardID, boardOptions, boardSelect, boards, data, event, files, input, inputs, item, items, name, o, row, rows, ta, table, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _m, _ref, _ref1, _ref2, _ref3, _ref4; + section.innerHTML = ""; items = {}; inputs = {}; _ref = ['boardnav', 'time', 'backlink', 'fileInfo', 'favicon', 'usercss']; @@ -16395,32 +16395,31 @@ $.on($('input[name=Interval]', section), 'change', ThreadUpdater.cb.interval); $.on($('input[name="Custom CSS"]', section), 'change', Settings.togglecss); $.on($.id('apply-css'), 'click', Settings.usercss); - boards = {}; + archBoards = {}; _ref1 = Redirect.archives; - for (name in _ref1) { - archive = _ref1[name]; - _ref2 = archive.boards; - for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) { - boardID = _ref2[_j]; - data = boards[boardID] || (boards[boardID] = { + for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { + _ref2 = _ref1[_j], name = _ref2.name, boards = _ref2.boards, files = _ref2.files, data = _ref2.data; + for (_k = 0, _len2 = boards.length; _k < _len2; _k++) { + boardID = boards[_k]; + o = archBoards[boardID] || (archBoards[boardID] = { thread: [], post: [], file: [] }); - data.thread.push(name); - if (archive.software === 'foolfuuka') { - data.post.push(name); + o.thread.push(name); + if (data.software === 'foolfuuka') { + o.post.push(name); } - if (__indexOf.call(archive.files, boardID) >= 0) { - data.file.push(name); + if (__indexOf.call(files, boardID) >= 0) { + o.file.push(name); } } } rows = []; boardOptions = []; - _ref3 = Object.keys(boards).sort(); - for (_k = 0, _len2 = _ref3.length; _k < _len2; _k++) { - boardID = _ref3[_k]; + _ref3 = Object.keys(archBoards).sort(); + for (_l = 0, _len3 = _ref3.length; _l < _len3; _l++) { + boardID = _ref3[_l]; row = $.el('tr', { className: "board-" + boardID }); @@ -16430,11 +16429,11 @@ value: "board-" + boardID, selected: boardID === g.BOARD.ID })); - data = boards[boardID]; + o = archBoards[boardID]; _ref4 = ['thread', 'post', 'file']; - for (_l = 0, _len3 = _ref4.length; _l < _len3; _l++) { - item = _ref4[_l]; - $.add(row, Settings.addArchiveCell(boardID, data, item)); + for (_m = 0, _len4 = _ref4.length; _m < _len4; _m++) { + item = _ref4[_m]; + $.add(row, Settings.addArchiveCell(boardID, o, item)); } rows.push(row); } diff --git a/builds/crx/script.js b/builds/crx/script.js index 5af7d9b72..86dba38b8 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -1,6 +1,6 @@ // Generated by CoffeeScript /* -* appchan x - Version 2.8.0 - 2014-01-11 +* appchan x - Version 2.8.0 - 2014-01-12 * * Licensed under the MIT license. * https://github.com/zixaphir/appchan-x/blob/master/LICENSE @@ -12340,7 +12340,7 @@ if (!((archive = archives[id]))) { continue; } - boards = type === 'file' ? archive.file : archive.boards; + boards = type === 'file' ? archive.files : archive.boards; if (__indexOf.call(boards, boardID) < 0) { continue; } @@ -16354,8 +16354,8 @@ return $.on(ta, 'change', $.cb.value); }, advanced: function(section) { - 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 = ""; + var archBoards, boardID, boardOptions, boardSelect, boards, data, event, files, input, inputs, item, items, name, o, row, rows, ta, table, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _m, _ref, _ref1, _ref2, _ref3, _ref4; + section.innerHTML = ""; items = {}; inputs = {}; _ref = ['boardnav', 'time', 'backlink', 'fileInfo', 'favicon', 'usercss']; @@ -16389,32 +16389,31 @@ $.on($('input[name=Interval]', section), 'change', ThreadUpdater.cb.interval); $.on($('input[name="Custom CSS"]', section), 'change', Settings.togglecss); $.on($.id('apply-css'), 'click', Settings.usercss); - boards = {}; + archBoards = {}; _ref1 = Redirect.archives; - for (name in _ref1) { - archive = _ref1[name]; - _ref2 = archive.boards; - for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) { - boardID = _ref2[_j]; - data = boards[boardID] || (boards[boardID] = { + for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { + _ref2 = _ref1[_j], name = _ref2.name, boards = _ref2.boards, files = _ref2.files, data = _ref2.data; + for (_k = 0, _len2 = boards.length; _k < _len2; _k++) { + boardID = boards[_k]; + o = archBoards[boardID] || (archBoards[boardID] = { thread: [], post: [], file: [] }); - data.thread.push(name); - if (archive.software === 'foolfuuka') { - data.post.push(name); + o.thread.push(name); + if (data.software === 'foolfuuka') { + o.post.push(name); } - if (__indexOf.call(archive.files, boardID) >= 0) { - data.file.push(name); + if (__indexOf.call(files, boardID) >= 0) { + o.file.push(name); } } } rows = []; boardOptions = []; - _ref3 = Object.keys(boards).sort(); - for (_k = 0, _len2 = _ref3.length; _k < _len2; _k++) { - boardID = _ref3[_k]; + _ref3 = Object.keys(archBoards).sort(); + for (_l = 0, _len3 = _ref3.length; _l < _len3; _l++) { + boardID = _ref3[_l]; row = $.el('tr', { className: "board-" + boardID }); @@ -16424,11 +16423,11 @@ value: "board-" + boardID, selected: boardID === g.BOARD.ID })); - data = boards[boardID]; + o = archBoards[boardID]; _ref4 = ['thread', 'post', 'file']; - for (_l = 0, _len3 = _ref4.length; _l < _len3; _l++) { - item = _ref4[_l]; - $.add(row, Settings.addArchiveCell(boardID, data, item)); + for (_m = 0, _len4 = _ref4.length; _m < _len4; _m++) { + item = _ref4[_m]; + $.add(row, Settings.addArchiveCell(boardID, o, item)); } rows.push(row); } diff --git a/src/Archive/Redirect.coffee b/src/Archive/Redirect.coffee index 06ac8f37f..a69dbb292 100755 --- a/src/Archive/Redirect.coffee +++ b/src/Archive/Redirect.coffee @@ -17,7 +17,7 @@ Redirect = for boardID, record of Conf['selectedArchives'] for type, id of record when (archive = archives[id]) - boards = if type is 'file' then archive.file else archive.boards + boards = if type is 'file' then archive.files else archive.boards continue unless boardID in boards o[type][boardID] = archive.data diff --git a/src/General/Settings.coffee b/src/General/Settings.coffee index dbe7796e1..58472f805 100755 --- a/src/General/Settings.coffee +++ b/src/General/Settings.coffee @@ -309,20 +309,20 @@ Settings = $.on $('input[name="Custom CSS"]', section), 'change', Settings.togglecss $.on $.id('apply-css'), 'click', Settings.usercss - boards = {} - for name, archive of Redirect.archives - for boardID in archive.boards - data = boards[boardID] or= + archBoards = {} + for {name, boards, files, data} in Redirect.archives + for boardID in boards + o = archBoards[boardID] or= thread: [] post: [] file: [] - data.thread.push name - data.post.push name if archive.software is 'foolfuuka' - data.file.push name if boardID in archive.files + o.thread.push name + o.post.push name if data.software is 'foolfuuka' + o.file.push name if boardID in files rows = [] boardOptions = [] - for boardID in Object.keys(boards).sort() # Alphabetical order + for boardID in Object.keys(archBoards).sort() # Alphabetical order row = $.el 'tr', className: "board-#{boardID}" row.hidden = boardID isnt g.BOARD.ID @@ -332,8 +332,8 @@ Settings = value: "board-#{boardID}" selected: boardID is g.BOARD.ID - data = boards[boardID] - $.add row, Settings.addArchiveCell boardID, data, item for item in ['thread', 'post', 'file'] + o = archBoards[boardID] + $.add row, Settings.addArchiveCell boardID, o, item for item in ['thread', 'post', 'file'] rows.push row $.add $('tbody', section), rows diff --git a/src/General/html/Settings/Advanced.html b/src/General/html/Settings/Advanced.html index 07b49fc96..6149e0870 100755 --- a/src/General/html/Settings/Advanced.html +++ b/src/General/html/Settings/Advanced.html @@ -65,7 +65,7 @@