diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 292826a6d..20631c875 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -22,7 +22,7 @@ // ==/UserScript== /* -* 4chan X - Version 1.3.0 - 2014-01-11 +* 4chan X - Version 1.3.0 - 2014-01-12 * * Licensed under the MIT license. * https://github.com/seaweedchan/4chan-x/blob/master/LICENSE @@ -10039,7 +10039,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; } @@ -12652,7 +12652,7 @@ 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; + 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 = "
Archiver
404 Redirect is disabled.
Thread redirectionPost fetchingFile redirection
Disabled selections indicate that only one archive is available for that board and redirection type.
Custom Board Navigation
New lines will be converted into spaces.

In the following examples for /g/, g can be changed to a different board ID (a, b, etc...), the current board (current), or the Twitter link (@).
Board link: g
Title link: g-title
Board link (Replace with title when on that board): g-replace
Full text link: g-full
Custom text link: g-text:\"Install Gentoo\"
Index-only link: g-index
Catalog-only link: g-catalog
External link: external-text:\"Google\",\"http://www.google.com\"
Combinations are possible: g-index-text:\"Technology Index\"
Full board list toggle: toggle-all

[ toggle-all ] [current-title] [g-title / a-title / jp-title] [x / wsg / h] [t-text:\"Piracy\"]
will give you
[ + ] [Technology] [Technology / Anime & Manga / Otaku Culture] [x / wsg / h] [Piracy]
if you are on /g/.
Time Formatting is disabled.
:
Supported format specifiers:
Day: %a, %A, %d, %e
Month: %m, %b, %B
Year: %y, %Y
Hour: %k, %H, %l, %I, %p, %P
Minute: %M
Second: %S
Quote Backlinks formatting is disabled.
:
File Info Formatting is disabled.
:
Link: %l (truncated), %L (untruncated), %T (Unix timestamp)
Original file name: %n (truncated), %N (untruncated), %t (Unix timestamp)
Spoiler indicator: %p
Size: %B (Bytes), %K (KB), %M (MB), %s (4chan default)
Resolution: %r (Displays 'PDF' for PDF files)
Quick Reply Personas is disabled.

One item per line.
Items will be added in the relevant input's auto-completion list.
Password items will always be used, since there is no password input.
Lines starting with a # will be ignored.

Unread Favicon is disabled.
Emoji is disabled.
Sage Icon:
Position:
Thread Updater is disabled.
Interval:
"; items = {}; inputs = {}; @@ -12689,32 +12689,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 }); @@ -12724,11 +12723,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 cd066205c..cfef73297 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -1,6 +1,6 @@ // Generated by CoffeeScript /* -* 4chan X - Version 1.3.0 - 2014-01-11 +* 4chan X - Version 1.3.0 - 2014-01-12 * * Licensed under the MIT license. * https://github.com/seaweedchan/4chan-x/blob/master/LICENSE @@ -10028,7 +10028,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; } @@ -12639,7 +12639,7 @@ 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; + 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 = "
Archiver
404 Redirect is disabled.
Thread redirectionPost fetchingFile redirection
Disabled selections indicate that only one archive is available for that board and redirection type.
Custom Board Navigation
New lines will be converted into spaces.

In the following examples for /g/, g can be changed to a different board ID (a, b, etc...), the current board (current), or the Twitter link (@).
Board link: g
Title link: g-title
Board link (Replace with title when on that board): g-replace
Full text link: g-full
Custom text link: g-text:\"Install Gentoo\"
Index-only link: g-index
Catalog-only link: g-catalog
External link: external-text:\"Google\",\"http://www.google.com\"
Combinations are possible: g-index-text:\"Technology Index\"
Full board list toggle: toggle-all

[ toggle-all ] [current-title] [g-title / a-title / jp-title] [x / wsg / h] [t-text:\"Piracy\"]
will give you
[ + ] [Technology] [Technology / Anime & Manga / Otaku Culture] [x / wsg / h] [Piracy]
if you are on /g/.
Time Formatting is disabled.
:
Supported format specifiers:
Day: %a, %A, %d, %e
Month: %m, %b, %B
Year: %y, %Y
Hour: %k, %H, %l, %I, %p, %P
Minute: %M
Second: %S
Quote Backlinks formatting is disabled.
:
File Info Formatting is disabled.
:
Link: %l (truncated), %L (untruncated), %T (Unix timestamp)
Original file name: %n (truncated), %N (untruncated), %t (Unix timestamp)
Spoiler indicator: %p
Size: %B (Bytes), %K (KB), %M (MB), %s (4chan default)
Resolution: %r (Displays 'PDF' for PDF files)
Quick Reply Personas is disabled.

One item per line.
Items will be added in the relevant input's auto-completion list.
Password items will always be used, since there is no password input.
Lines starting with a # will be ignored.

Unread Favicon is disabled.
Emoji is disabled.
Sage Icon:
Position:
Thread Updater is disabled.
Interval:
"; items = {}; inputs = {}; @@ -12676,32 +12676,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 }); @@ -12711,11 +12710,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 a7f944a24..984fd23e0 100755 --- a/src/General/Settings.coffee +++ b/src/General/Settings.coffee @@ -333,20 +333,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 @@ -356,8 +356,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