From 1afc0eb2232a630180b8f25d80c4b70d77759152 Mon Sep 17 00:00:00 2001 From: Jordan Bates Date: Fri, 26 Apr 2013 11:45:15 -0700 Subject: [PATCH] Fix #30 --- builds/4chan-X.js | 18 ++++++++++++++---- builds/4chan-X.user.js | 18 ++++++++++++++---- builds/crx/script.js | 18 ++++++++++++++---- src/settings.coffee | 10 +++++++++- 4 files changed, 51 insertions(+), 13 deletions(-) diff --git a/builds/4chan-X.js b/builds/4chan-X.js index a673ad123..4e1c2342a 100644 --- a/builds/4chan-X.js +++ b/builds/4chan-X.js @@ -9337,12 +9337,12 @@ return $.on(sauce, 'change', $.cb.value); }, advanced: function(section) { - var archiver, event, input, inputs, items, name, toSelect, _i, _j, _len, _len1, _ref; + var archiver, event, input, inputs, intervalInput, intervalInputs, intervalItems, items, name, toSelect, _i, _j, _k, _len, _len1, _len2, _ref, _ref1; section.innerHTML = "
\n Archiver\n Select an Archiver for this board:\n \n
\n
\n Custom Board Navigation\n
\n
In the following, board can translate to a board ID (a, b, etc...), the current board (current), or the Status/Twitter link (status, @).
\n
\n For example:
\n [ toggle-all ] [current-title] [g-title / a-title / jp-title] [x / wsg / h] [t-text:\"Piracy\"]
\n will give you
\n [ + ] [Technology] [Technology / Anime & Manga / Otaku Culture] [x / wsg / h] [Piracy]
\n if you are on /g/.\n
\n
Board link: board
\n
Title link: board-title
\n
Board link (Replace with title when on that board): board-replace
\n
Full text link: board-full
\n
Custom text link: board-text:\"VIP Board\"
\n
Index-only link: board-index
\n
Catalog-only link: board-catalog
\n
Combinations are possible: board-index-text:\"VIP Index\"
\n
Full board list toggle: toggle-all
\n
\n\n
\n Time Formatting is disabled.\n
:
\n
Supported format specifiers:
\n
Day: %a, %A, %d, %e
\n
Month: %m, %b, %B
\n
Year: %y
\n
Hour: %k, %H, %l, %I, %p, %P
\n
Minute: %M
\n
Second: %S
\n
\n\n
\n Quote Backlinks formatting is disabled.\n
:
\n
\n\n
\n File Info Formatting is disabled.\n
:
\n
Link: %l (truncated), %L (untruncated), %T (Unix timestamp)
\n
Original file name: %n (truncated), %N (untruncated), %t (Unix timestamp)
\n
Spoiler indicator: %p
\n
Size: %B (Bytes), %K (KB), %M (MB), %s (4chan default)
\n
Resolution: %r (Displays 'PDF' for PDF files)
\n
\n\n
\n Unread Favicon is disabled.\n \n \n
\n\n
\n Emoji is disabled.\n
\n Sage Icon: \n \n
\n
\n Position: \n
\n
\n\n
\n Thread Updater is disabled.\n
\n Interval: \n
\n\n
\n \n \n \n \n \n
"; items = {}; inputs = {}; - _ref = ['boardnav', 'time', 'backlink', 'fileInfo', 'favicon', 'sageEmoji', 'emojiPos', 'usercss', 'Interval']; + _ref = ['boardnav', 'time', 'backlink', 'fileInfo', 'favicon', 'sageEmoji', 'emojiPos', 'usercss']; for (_i = 0, _len = _ref.length; _i < _len; _i++) { name = _ref[_i]; input = $("[name=" + name + "]", section); @@ -9351,13 +9351,23 @@ event = ['favicon', 'usercss', 'sageEmoji', 'emojiPos'].contains(name) ? 'change' : 'input'; $.on(input, event, $.cb.value); } + intervalItems = {}; + intervalInputs = {}; + _ref1 = ['Interval']; + for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { + name = _ref1[_j]; + intervalInput = $("[name=" + name + "]", section); + intervalItems[name] = Conf[name]; + intervalInputs[name] = input; + $.on(intervalInput, 'input', $.cb.value); + } archiver = $('select[name=archiver]', section); toSelect = Redirect.select(g.BOARD.ID); if (!toSelect[0]) { toSelect = ['No Archive Available']; } - for (_j = 0, _len1 = toSelect.length; _j < _len1; _j++) { - name = toSelect[_j]; + for (_k = 0, _len2 = toSelect.length; _k < _len2; _k++) { + name = toSelect[_k]; $.add(archiver, $.el('option', { textContent: name })); diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 3947ccbab..39d8df8fb 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -9360,12 +9360,12 @@ return $.on(sauce, 'change', $.cb.value); }, advanced: function(section) { - var archiver, event, input, inputs, items, name, toSelect, _i, _j, _len, _len1, _ref; + var archiver, event, input, inputs, intervalInput, intervalInputs, intervalItems, items, name, toSelect, _i, _j, _k, _len, _len1, _len2, _ref, _ref1; section.innerHTML = "
\n Archiver\n Select an Archiver for this board:\n \n
\n
\n Custom Board Navigation\n
\n
In the following, board can translate to a board ID (a, b, etc...), the current board (current), or the Status/Twitter link (status, @).
\n
\n For example:
\n [ toggle-all ] [current-title] [g-title / a-title / jp-title] [x / wsg / h] [t-text:\"Piracy\"]
\n will give you
\n [ + ] [Technology] [Technology / Anime & Manga / Otaku Culture] [x / wsg / h] [Piracy]
\n if you are on /g/.\n
\n
Board link: board
\n
Title link: board-title
\n
Board link (Replace with title when on that board): board-replace
\n
Full text link: board-full
\n
Custom text link: board-text:\"VIP Board\"
\n
Index-only link: board-index
\n
Catalog-only link: board-catalog
\n
Combinations are possible: board-index-text:\"VIP Index\"
\n
Full board list toggle: toggle-all
\n
\n\n
\n Time Formatting is disabled.\n
:
\n
Supported format specifiers:
\n
Day: %a, %A, %d, %e
\n
Month: %m, %b, %B
\n
Year: %y
\n
Hour: %k, %H, %l, %I, %p, %P
\n
Minute: %M
\n
Second: %S
\n
\n\n
\n Quote Backlinks formatting is disabled.\n
:
\n
\n\n
\n File Info Formatting is disabled.\n
:
\n
Link: %l (truncated), %L (untruncated), %T (Unix timestamp)
\n
Original file name: %n (truncated), %N (untruncated), %t (Unix timestamp)
\n
Spoiler indicator: %p
\n
Size: %B (Bytes), %K (KB), %M (MB), %s (4chan default)
\n
Resolution: %r (Displays 'PDF' for PDF files)
\n
\n\n
\n Unread Favicon is disabled.\n \n \n
\n\n
\n Emoji is disabled.\n
\n Sage Icon: \n \n
\n
\n Position: \n
\n
\n\n
\n Thread Updater is disabled.\n
\n Interval: \n
\n\n
\n \n \n \n \n \n
"; items = {}; inputs = {}; - _ref = ['boardnav', 'time', 'backlink', 'fileInfo', 'favicon', 'sageEmoji', 'emojiPos', 'usercss', 'Interval']; + _ref = ['boardnav', 'time', 'backlink', 'fileInfo', 'favicon', 'sageEmoji', 'emojiPos', 'usercss']; for (_i = 0, _len = _ref.length; _i < _len; _i++) { name = _ref[_i]; input = $("[name=" + name + "]", section); @@ -9374,13 +9374,23 @@ event = ['favicon', 'usercss', 'sageEmoji', 'emojiPos'].contains(name) ? 'change' : 'input'; $.on(input, event, $.cb.value); } + intervalItems = {}; + intervalInputs = {}; + _ref1 = ['Interval']; + for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { + name = _ref1[_j]; + intervalInput = $("[name=" + name + "]", section); + intervalItems[name] = Conf[name]; + intervalInputs[name] = input; + $.on(intervalInput, 'input', $.cb.value); + } archiver = $('select[name=archiver]', section); toSelect = Redirect.select(g.BOARD.ID); if (!toSelect[0]) { toSelect = ['No Archive Available']; } - for (_j = 0, _len1 = toSelect.length; _j < _len1; _j++) { - name = toSelect[_j]; + for (_k = 0, _len2 = toSelect.length; _k < _len2; _k++) { + name = toSelect[_k]; $.add(archiver, $.el('option', { textContent: name })); diff --git a/builds/crx/script.js b/builds/crx/script.js index bab66f01a..457006a55 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -9252,12 +9252,12 @@ return $.on(sauce, 'change', $.cb.value); }, advanced: function(section) { - var archiver, event, input, inputs, items, name, toSelect, _i, _j, _len, _len1, _ref; + var archiver, event, input, inputs, intervalInput, intervalInputs, intervalItems, items, name, toSelect, _i, _j, _k, _len, _len1, _len2, _ref, _ref1; section.innerHTML = "
\n Archiver\n Select an Archiver for this board:\n \n
\n
\n Custom Board Navigation\n
\n
In the following, board can translate to a board ID (a, b, etc...), the current board (current), or the Status/Twitter link (status, @).
\n
\n For example:
\n [ toggle-all ] [current-title] [g-title / a-title / jp-title] [x / wsg / h] [t-text:\"Piracy\"]
\n will give you
\n [ + ] [Technology] [Technology / Anime & Manga / Otaku Culture] [x / wsg / h] [Piracy]
\n if you are on /g/.\n
\n
Board link: board
\n
Title link: board-title
\n
Board link (Replace with title when on that board): board-replace
\n
Full text link: board-full
\n
Custom text link: board-text:\"VIP Board\"
\n
Index-only link: board-index
\n
Catalog-only link: board-catalog
\n
Combinations are possible: board-index-text:\"VIP Index\"
\n
Full board list toggle: toggle-all
\n
\n\n
\n Time Formatting is disabled.\n
:
\n
Supported format specifiers:
\n
Day: %a, %A, %d, %e
\n
Month: %m, %b, %B
\n
Year: %y
\n
Hour: %k, %H, %l, %I, %p, %P
\n
Minute: %M
\n
Second: %S
\n
\n\n
\n Quote Backlinks formatting is disabled.\n
:
\n
\n\n
\n File Info Formatting is disabled.\n
:
\n
Link: %l (truncated), %L (untruncated), %T (Unix timestamp)
\n
Original file name: %n (truncated), %N (untruncated), %t (Unix timestamp)
\n
Spoiler indicator: %p
\n
Size: %B (Bytes), %K (KB), %M (MB), %s (4chan default)
\n
Resolution: %r (Displays 'PDF' for PDF files)
\n
\n\n
\n Unread Favicon is disabled.\n \n \n
\n\n
\n Emoji is disabled.\n
\n Sage Icon: \n \n
\n
\n Position: \n
\n
\n\n
\n Thread Updater is disabled.\n
\n Interval: \n
\n\n
\n \n \n \n \n \n
"; items = {}; inputs = {}; - _ref = ['boardnav', 'time', 'backlink', 'fileInfo', 'favicon', 'sageEmoji', 'emojiPos', 'usercss', 'Interval']; + _ref = ['boardnav', 'time', 'backlink', 'fileInfo', 'favicon', 'sageEmoji', 'emojiPos', 'usercss']; for (_i = 0, _len = _ref.length; _i < _len; _i++) { name = _ref[_i]; input = $("[name=" + name + "]", section); @@ -9266,13 +9266,23 @@ event = ['favicon', 'usercss', 'sageEmoji', 'emojiPos'].contains(name) ? 'change' : 'input'; $.on(input, event, $.cb.value); } + intervalItems = {}; + intervalInputs = {}; + _ref1 = ['Interval']; + for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { + name = _ref1[_j]; + intervalInput = $("[name=" + name + "]", section); + intervalItems[name] = Conf[name]; + intervalInputs[name] = input; + $.on(intervalInput, 'input', $.cb.value); + } archiver = $('select[name=archiver]', section); toSelect = Redirect.select(g.BOARD.ID); if (!toSelect[0]) { toSelect = ['No Archive Available']; } - for (_j = 0, _len1 = toSelect.length; _j < _len1; _j++) { - name = toSelect[_j]; + for (_k = 0, _len2 = toSelect.length; _k < _len2; _k++) { + name = toSelect[_k]; $.add(archiver, $.el('option', { textContent: name })); diff --git a/src/settings.coffee b/src/settings.coffee index 71a4142a7..47c723d9e 100644 --- a/src/settings.coffee +++ b/src/settings.coffee @@ -475,7 +475,7 @@ Settings = """ items = {} inputs = {} - for name in ['boardnav', 'time', 'backlink', 'fileInfo', 'favicon', 'sageEmoji', 'emojiPos', 'usercss', 'Interval'] + for name in ['boardnav', 'time', 'backlink', 'fileInfo', 'favicon', 'sageEmoji', 'emojiPos', 'usercss'] input = $ "[name=#{name}]", section items[name] = Conf[name] inputs[name] = input @@ -485,6 +485,14 @@ Settings = 'input' $.on input, event, $.cb.value + intervalItems = {} + intervalInputs = {} + for name in ['Interval'] + intervalInput = $ "[name=#{name}]", section + intervalItems[name] = Conf[name] + intervalInputs[name] = input + $.on intervalInput, 'input', $.cb.value + # Archiver archiver = $ 'select[name=archiver]', section toSelect = Redirect.select g.BOARD.ID