From 86b5b0931c7c630c5179570a3b5c2af78c695656 Mon Sep 17 00:00:00 2001 From: Zixaphir Date: Tue, 14 May 2013 12:19:07 -0700 Subject: [PATCH] *yawn* --- builds/4chan-X.js | 8 ++++++-- builds/4chan-X.user.js | 8 ++++++-- builds/crx/script.js | 8 ++++++-- src/General/Settings.coffee | 17 ++++++----------- 4 files changed, 24 insertions(+), 17 deletions(-) diff --git a/builds/4chan-X.js b/builds/4chan-X.js index 87cd5781c..ea3a33344 100644 --- a/builds/4chan-X.js +++ b/builds/4chan-X.js @@ -9764,7 +9764,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 = "
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, board can translate to a board ID (a, b, etc...), the current board (current), or the Status/Twitter link (status, @).
\n For example:
[ toggle-all ] [current-title] [g-title / a-title / jp-title] [x / wsg / h] [t-text:\"Piracy\"]
\n will give you
[ + ] [Technology] [Technology / Anime & Manga / Otaku Culture] [x / wsg / h] [Piracy]
\n if you are on /g/.\n
Board link: board
Title link: board-title
Board link (Replace with title when on that board): board-replace
Full text link: board-full
Custom text link: board-text:\"VIP Board\"
Index-only link: board-index
Catalog-only link: board-catalog
External link: external-text:\"Google\",\"http://www.google.com\"
Combinations are possible: board-index-text:\"VIP Index\"
Full board list toggle: toggle-all
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.

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

Unread Favicon is disabled.
Emoji is disabled.
\n Sage Icon:
\n Position:
Thread Updater is disabled.
\n Interval:
"; items = {}; @@ -9840,7 +9840,11 @@ 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)); + } } $.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..670aad555 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -9775,7 +9775,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 = "
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, board can translate to a board ID (a, b, etc...), the current board (current), or the Status/Twitter link (status, @).
\n For example:
[ toggle-all ] [current-title] [g-title / a-title / jp-title] [x / wsg / h] [t-text:\"Piracy\"]
\n will give you
[ + ] [Technology] [Technology / Anime & Manga / Otaku Culture] [x / wsg / h] [Piracy]
\n if you are on /g/.\n
Board link: board
Title link: board-title
Board link (Replace with title when on that board): board-replace
Full text link: board-full
Custom text link: board-text:\"VIP Board\"
Index-only link: board-index
Catalog-only link: board-catalog
External link: external-text:\"Google\",\"http://www.google.com\"
Combinations are possible: board-index-text:\"VIP Index\"
Full board list toggle: toggle-all
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.

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

Unread Favicon is disabled.
Emoji is disabled.
\n Sage Icon:
\n Position:
Thread Updater is disabled.
\n Interval:
"; items = {}; @@ -9851,7 +9851,11 @@ 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)); + } } $.add($('tbody', section), rows); boardSelect = $('#archive-board-select', section); diff --git a/builds/crx/script.js b/builds/crx/script.js index b98ba229a..521e80aa5 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -9756,7 +9756,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 = "
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, board can translate to a board ID (a, b, etc...), the current board (current), or the Status/Twitter link (status, @).
\n For example:
[ toggle-all ] [current-title] [g-title / a-title / jp-title] [x / wsg / h] [t-text:\"Piracy\"]
\n will give you
[ + ] [Technology] [Technology / Anime & Manga / Otaku Culture] [x / wsg / h] [Piracy]
\n if you are on /g/.\n
Board link: board
Title link: board-title
Board link (Replace with title when on that board): board-replace
Full text link: board-full
Custom text link: board-text:\"VIP Board\"
Index-only link: board-index
Catalog-only link: board-catalog
External link: external-text:\"Google\",\"http://www.google.com\"
Combinations are possible: board-index-text:\"VIP Index\"
Full board list toggle: toggle-all
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.

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

Unread Favicon is disabled.
Emoji is disabled.
\n Sage Icon:
\n Position:
Thread Updater is disabled.
\n Interval:
"; items = {}; @@ -9832,7 +9832,11 @@ 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)); + } } $.add($('tbody', section), rows); boardSelect = $('#archive-board-select', section); diff --git a/src/General/Settings.coffee b/src/General/Settings.coffee index 885f67339..94571cd75 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,8 @@ 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'] + $.add $('tbody', section), rows boardSelect = $('#archive-board-select', section)