diff --git a/builds/appchan-x.user.js b/builds/appchan-x.user.js index d39dd9eb8..da9c89a24 100644 --- a/builds/appchan-x.user.js +++ b/builds/appchan-x.user.js @@ -17886,7 +17886,7 @@ clientHeight = d.documentElement.clientHeight; style = ul.style; style.cssText = ("width: " + width + "px; left: " + left + "px;") + (clientHeight - bottom < 200 ? "bottom: " + (clientHeight - top) + "px" : "top: " + bottom + "px"); - Rice.input = select = this.previousSibling; + Rice.input = select = this.previousElementSibling; nodes = []; _ref1 = select.options; for (_i = 0, _len = _ref1.length; _i < _len; _i++) { @@ -19230,9 +19230,9 @@ return $.on(ta, 'change', $.cb.value); }, advanced: function(section) { - var archBoards, boardID, boardOptions, boardSelect, boards, customCSS, event, files, i, input, inputs, interval, item, items, name, o, row, rows, software, ta, table, warning, withCredentials, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _len5, _len6, _m, _n, _o, _ref, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6; + var archBoards, boardID, boardOptions, boardSelect, boards, customCSS, files, i, input, inputs, interval, item, items, name, o, row, rows, software, ta, table, warning, withCredentials, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _len5, _len6, _m, _n, _o, _ref, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6; $.extend(section, { - innerHTML: "
\rArchiver\r
404 Redirect is disabled.
\r
\r\r\r\r\r\r\r\r
Thread redirectionPost fetchingFile redirection
\rDisabled selections indicate that only one archive is available for that board and redirection type.\r
\r
\rCustom Board Navigation\r
\rNew lines will be converted into spaces.

\r
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 (@).
\r
Board link: g
\r
Title link: g-title
\r
Board link (Replace with title when on that board): g-replace
\r
Full text link: g-full
\r
Custom text link: g-text:\"Install Gentoo\"
\r
External link: external-text:\"Google\",\"http://www.google.com\"
\r
Index mode: g-mode:\"type\" where type is paged, all threads or catalog
\r
Index sort: g-sort:\"type\" where type is bump order, last reply, creation date, reply count or file countCombinations are possible: g-text:\"VIP Catalog\"-mode:\"catalog\"-sort:\"creation date\"
\r
Full board list toggle: toggle-all
\r
\r
\r[ toggle-all ] [current-title] [g-title / a-title / jp-title] [x / wsg / h-mode:\"catalog\"-sort:\"file count\"] [t-text:\"Piracy\"]
\rwill give you
\r[ + ] [Technology] [Technology / Anime & Manga / Otaku Culture] [x / wsg / h] [Piracy]
\rif you are on /g/.\r
\r
\r
\rTime Formatting is disabled.\r
:
\r
Supported format specifiers:
\r
Day: %a, %A, %d, %e
\r
Month: %m, %b, %B
\r
Year: %y, %Y
\r
Hour: %k, %H, %l, %I, %p, %P
\r
Minute: %M
\r
Second: %S
\r
\r
\rQuote Backlinks formatting is disabled.\r
:
\r
\r
\rFile Info Formatting is disabled.\r
:
\r
Link: %l (truncated), %L (untruncated), %T (Unix timestamp)
\r
Original file name: %n (truncated), %N (untruncated), %t (Unix timestamp)
\r
Spoiler indicator: %p
\r
Size: %B (Bytes), %K (KB), %M (MB), %s (4chan default)
\r
Resolution: %r (Displays 'PDF' for PDF files)
\r
\r
\rQuick Reply Personas\r\r

\rOne item per line.
\rItems will be added in the relevant input's auto-completion list.
\rPassword items will always be used, since there is no password input.
\rLines starting with a # will be ignored.\r

\r\r
\r
\rUnread Favicon is disabled.\r\r\r
\r
\rThread Updater is disabled.\r
\rInterval: \r
\r
\r
\r Custom CSS\r
\r\r\r
\r
\r" + innerHTML: "
\rArchiver\r
404 Redirect is disabled.
\r
\r\r\r\r\r\r\r\r
Thread redirectionPost fetchingFile redirection
\rDisabled selections indicate that only one archive is available for that board and redirection type.\r
\r
\rCustom Board Navigation\r
\rNew lines will be converted into spaces.

\r
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 (@).
\r
Board link: g
\r
Archive link: g-archive
\r
Internal archive link: g-expired
\r
Title link: g-title
\r
Board link (Replace with title when on that board): g-replace
\r
Full text link: g-full
\r
Custom text link: g-text:\"Install Gentoo\"
\r
Index-only link: g-index
\r
Catalog-only link: g-catalog
\r
External link: external-text:\"Google\",\"http://www.google.com\"
\r
Index mode: g-mode:\"type\" where type is paged, all threads or catalog
\r
Index sort: g-sort:\"type\" where type is bump order, last reply, creation date, reply count or file countCombinations are possible: g-index-text:\"Technology Index\"
\r
Full board list toggle: toggle-all
\r
\r
\r[ toggle-all ] [current-title] [g-title / a-title / jp-title] [x / wsg / h] [t-text:\"Piracy\"]
\rwill give you
\r[ + ] [Technology] [Technology / Anime & Manga / Otaku Culture] [x / wsg / h] [Piracy]
\rif you are on /g/.\r
\r
\r
\rTime Formatting is disabled.\r
:
\r
Supported format specifiers:
\r
Day: %a, %A, %d, %e
\r
Month: %m, %b, %B
\r
Year: %y, %Y
\r
Hour: %k, %H, %l, %I, %p, %P
\r
Minute: %M
\r
Second: %S
\r
\r
\rQuote Backlinks formatting is disabled.\r
:
\r
\r
\rFile Info Formatting is disabled.\r
:
\r
Link: %l (truncated), %L (untruncated), %T (Unix timestamp)
\r
Original file name: %n (truncated), %N (untruncated), %t (Unix timestamp)
\r
Spoiler indicator: %p
\r
Size: %B (Bytes), %K (KB), %M (MB), %s (4chan default)
\r
Resolution: %r (Displays 'PDF' for PDF files)
\r
\r
\rQuick Reply Personas\r\r

\rOne item per line.
\rItems will be added in the relevant input's auto-completion list.
\rPassword items will always be used, since there is no password input.
\rLines starting with a # will be ignored.\r

\r\r
\r
\rUnread Favicon is disabled.\r\r\r\r\r\r\r\r
\r
\rThread Updater is disabled.\r
\rInterval: seconds\r
\r
\r
\r\r\r\r\r\r
\r" }); _ref = $$('.warning', section); for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -19247,8 +19247,15 @@ input = $("[name='" + name + "']", section); items[name] = Conf[name]; inputs[name] = input; - event = name === 'favicon' || name === 'usercss' ? 'change' : 'input'; - $.on(input, event, $.cb.value); + if (name === 'usercss') { + $.on(input, 'change', $.cb.value); + } else if (name === 'favicon') { + $.on(input, 'change', $.cb.value); + $.on(input, 'change', Settings[name]); + } else { + $.on(input, 'input', $.cb.value); + $.on(input, 'input', Settings[name]); + } } ta = $('.personafield', section); $.get('QR.personas', Conf['QR.personas'], function(item) { @@ -19264,7 +19271,6 @@ if (key === 'usercss') { continue; } - $.on(input, event, Settings[key]); Settings[key].call(input); } return Rice.nodes(section); @@ -19431,7 +19437,7 @@ if (g.VIEW === 'thread' && Conf['Unread Favicon']) { Unread.update(); } - img = this.nextElementSibling.children; + img = ($.id('favicon-preview')).children; img[0].src = Favicon["default"]; img[1].src = Favicon.unreadSFW; img[2].src = Favicon.unreadNSFW; diff --git a/builds/crx/script.js b/builds/crx/script.js index 2b17be133..7b781ff0a 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -17901,7 +17901,7 @@ clientHeight = d.documentElement.clientHeight; style = ul.style; style.cssText = ("width: " + width + "px; left: " + left + "px;") + (clientHeight - bottom < 200 ? "bottom: " + (clientHeight - top) + "px" : "top: " + bottom + "px"); - Rice.input = select = this.previousSibling; + Rice.input = select = this.previousElementSibling; nodes = []; _ref1 = select.options; for (_i = 0, _len = _ref1.length; _i < _len; _i++) { @@ -19254,9 +19254,9 @@ return $.on(ta, 'change', $.cb.value); }, advanced: function(section) { - var archBoards, boardID, boardOptions, boardSelect, boards, customCSS, event, files, i, input, inputs, interval, item, items, name, o, row, rows, software, ta, table, warning, withCredentials, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _len5, _len6, _m, _n, _o, _ref, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6; + var archBoards, boardID, boardOptions, boardSelect, boards, customCSS, files, i, input, inputs, interval, item, items, name, o, row, rows, software, ta, table, warning, withCredentials, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _len5, _len6, _m, _n, _o, _ref, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6; $.extend(section, { - innerHTML: "
\rArchiver\r
404 Redirect is disabled.
\r
\r\r\r\r\r\r\r\r
Thread redirectionPost fetchingFile redirection
\rDisabled selections indicate that only one archive is available for that board and redirection type.\r
\r
\rCustom Board Navigation\r
\rNew lines will be converted into spaces.

\r
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 (@).
\r
Board link: g
\r
Title link: g-title
\r
Board link (Replace with title when on that board): g-replace
\r
Full text link: g-full
\r
Custom text link: g-text:\"Install Gentoo\"
\r
External link: external-text:\"Google\",\"http://www.google.com\"
\r
Index mode: g-mode:\"type\" where type is paged, all threads or catalog
\r
Index sort: g-sort:\"type\" where type is bump order, last reply, creation date, reply count or file countCombinations are possible: g-text:\"VIP Catalog\"-mode:\"catalog\"-sort:\"creation date\"
\r
Full board list toggle: toggle-all
\r
\r
\r[ toggle-all ] [current-title] [g-title / a-title / jp-title] [x / wsg / h-mode:\"catalog\"-sort:\"file count\"] [t-text:\"Piracy\"]
\rwill give you
\r[ + ] [Technology] [Technology / Anime & Manga / Otaku Culture] [x / wsg / h] [Piracy]
\rif you are on /g/.\r
\r
\r
\rTime Formatting is disabled.\r
:
\r
Supported format specifiers:
\r
Day: %a, %A, %d, %e
\r
Month: %m, %b, %B
\r
Year: %y, %Y
\r
Hour: %k, %H, %l, %I, %p, %P
\r
Minute: %M
\r
Second: %S
\r
\r
\rQuote Backlinks formatting is disabled.\r
:
\r
\r
\rFile Info Formatting is disabled.\r
:
\r
Link: %l (truncated), %L (untruncated), %T (Unix timestamp)
\r
Original file name: %n (truncated), %N (untruncated), %t (Unix timestamp)
\r
Spoiler indicator: %p
\r
Size: %B (Bytes), %K (KB), %M (MB), %s (4chan default)
\r
Resolution: %r (Displays 'PDF' for PDF files)
\r
\r
\rQuick Reply Personas\r\r

\rOne item per line.
\rItems will be added in the relevant input's auto-completion list.
\rPassword items will always be used, since there is no password input.
\rLines starting with a # will be ignored.\r

\r\r
\r
\rUnread Favicon is disabled.\r\r\r
\r
\rThread Updater is disabled.\r
\rInterval: \r
\r
\r
\r Custom CSS\r
\r\r\r
\r
\r" + innerHTML: "
\rArchiver\r
404 Redirect is disabled.
\r
\r\r\r\r\r\r\r\r
Thread redirectionPost fetchingFile redirection
\rDisabled selections indicate that only one archive is available for that board and redirection type.\r
\r
\rCustom Board Navigation\r
\rNew lines will be converted into spaces.

\r
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 (@).
\r
Board link: g
\r
Archive link: g-archive
\r
Internal archive link: g-expired
\r
Title link: g-title
\r
Board link (Replace with title when on that board): g-replace
\r
Full text link: g-full
\r
Custom text link: g-text:\"Install Gentoo\"
\r
Index-only link: g-index
\r
Catalog-only link: g-catalog
\r
External link: external-text:\"Google\",\"http://www.google.com\"
\r
Index mode: g-mode:\"type\" where type is paged, all threads or catalog
\r
Index sort: g-sort:\"type\" where type is bump order, last reply, creation date, reply count or file countCombinations are possible: g-index-text:\"Technology Index\"
\r
Full board list toggle: toggle-all
\r
\r
\r[ toggle-all ] [current-title] [g-title / a-title / jp-title] [x / wsg / h] [t-text:\"Piracy\"]
\rwill give you
\r[ + ] [Technology] [Technology / Anime & Manga / Otaku Culture] [x / wsg / h] [Piracy]
\rif you are on /g/.\r
\r
\r
\rTime Formatting is disabled.\r
:
\r
Supported format specifiers:
\r
Day: %a, %A, %d, %e
\r
Month: %m, %b, %B
\r
Year: %y, %Y
\r
Hour: %k, %H, %l, %I, %p, %P
\r
Minute: %M
\r
Second: %S
\r
\r
\rQuote Backlinks formatting is disabled.\r
:
\r
\r
\rFile Info Formatting is disabled.\r
:
\r
Link: %l (truncated), %L (untruncated), %T (Unix timestamp)
\r
Original file name: %n (truncated), %N (untruncated), %t (Unix timestamp)
\r
Spoiler indicator: %p
\r
Size: %B (Bytes), %K (KB), %M (MB), %s (4chan default)
\r
Resolution: %r (Displays 'PDF' for PDF files)
\r
\r
\rQuick Reply Personas\r\r

\rOne item per line.
\rItems will be added in the relevant input's auto-completion list.
\rPassword items will always be used, since there is no password input.
\rLines starting with a # will be ignored.\r

\r\r
\r
\rUnread Favicon is disabled.\r\r\r\r\r\r\r\r
\r
\rThread Updater is disabled.\r
\rInterval: seconds\r
\r
\r
\r\r\r\r\r\r
\r" }); _ref = $$('.warning', section); for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -19271,8 +19271,15 @@ input = $("[name='" + name + "']", section); items[name] = Conf[name]; inputs[name] = input; - event = name === 'favicon' || name === 'usercss' ? 'change' : 'input'; - $.on(input, event, $.cb.value); + if (name === 'usercss') { + $.on(input, 'change', $.cb.value); + } else if (name === 'favicon') { + $.on(input, 'change', $.cb.value); + $.on(input, 'change', Settings[name]); + } else { + $.on(input, 'input', $.cb.value); + $.on(input, 'input', Settings[name]); + } } ta = $('.personafield', section); $.get('QR.personas', Conf['QR.personas'], function(item) { @@ -19288,7 +19295,6 @@ if (key === 'usercss') { continue; } - $.on(input, event, Settings[key]); Settings[key].call(input); } return Rice.nodes(section); @@ -19455,7 +19461,7 @@ if (g.VIEW === 'thread' && Conf['Unread Favicon']) { Unread.update(); } - img = this.nextElementSibling.children; + img = ($.id('favicon-preview')).children; img[0].src = Favicon["default"]; img[1].src = Favicon.unreadSFW; img[2].src = Favicon.unreadNSFW; diff --git a/src/General/Settings.coffee b/src/General/Settings.coffee index 0d186602a..777674112 100755 --- a/src/General/Settings.coffee +++ b/src/General/Settings.coffee @@ -245,14 +245,18 @@ Settings = input = $ "[name='#{name}']", section items[name] = Conf[name] inputs[name] = input - event = if name in ['favicon', 'usercss'] - 'change' + if name is 'usercss' + $.on input, 'change', $.cb.value + else if name is 'favicon' + $.on input, 'change', $.cb.value + $.on input, 'change', Settings[name] else - 'input' - $.on input, event, $.cb.value + $.on input, 'input', $.cb.value + $.on input, 'input', Settings[name] # Quick Reply Personas ta = $ '.personafield', section + $.get 'QR.personas', Conf['QR.personas'], (item) -> ta.value = item['QR.personas'] $.on ta, 'change', $.cb.value @@ -262,7 +266,6 @@ Settings = input = inputs[key] input.value = val continue if key is 'usercss' - $.on input, event, Settings[key] Settings[key].call input Rice.nodes section @@ -387,7 +390,7 @@ Settings = favicon: -> Favicon.switch() Unread.update() if g.VIEW is 'thread' and Conf['Unread Favicon'] - img = @nextElementSibling.children + img = ($.id 'favicon-preview').children img[0].src = Favicon.default img[1].src = Favicon.unreadSFW img[2].src = Favicon.unreadNSFW diff --git a/src/General/html/Settings/Advanced.html b/src/General/html/Settings/Advanced.html index 70d77e874..c4aa82464 100755 --- a/src/General/html/Settings/Advanced.html +++ b/src/General/html/Settings/Advanced.html @@ -1,6 +1,6 @@
Archiver -
404 Redirect is disabled.
+
404 Redirect is disabled.
@@ -19,18 +19,22 @@ 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
+
Archive link: g-archive
+
Internal archive link: g-expired
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"
Index mode: g-mode:"type" where type is paged, all threads or catalog
Index sort: g-sort:"type" where type is bump order, last reply, creation date, reply count or file count
Combinations are possible: g-text:"VIP Catalog"-mode:"catalog"-sort:"creation date" +
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-mode:"catalog"-sort:"file count"] [t-text:"Piracy"]
+ [ 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/. @@ -38,7 +42,7 @@
- Time Formatting is disabled. + Time Formatting is disabled.
:
Supported format specifiers:
Day: %a, %A, %d, %e
@@ -50,13 +54,13 @@
- Quote Backlinks formatting is disabled. + Quote Backlinks formatting is disabled.
:
- File Info 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
@@ -66,7 +70,7 @@
Quick Reply Personas - +

One item per line.
Items will be added in the relevant input's auto-completion list.
@@ -82,29 +86,34 @@

- Unread Favicon is disabled. + Unread Favicon is disabled. - + + + + + +
- Thread Updater is disabled. + Thread Updater is disabled.
- Interval: + Interval: seconds
- Custom CSS -
- - -
+ + + + +
diff --git a/src/General/lib/$.coffee b/src/General/lib/$.coffee index 068c67296..1b6e8dfe1 100755 --- a/src/General/lib/$.coffee +++ b/src/General/lib/$.coffee @@ -189,6 +189,7 @@ $.one = (el, events, handler) -> $.off el, events, cb handler.call @, e $.on el, events, cb + $.event = (event, detail, root=d) -> <% if (type === 'userscript') { %> if detail? and typeof cloneInto is 'function' diff --git a/src/Theming/Rice.coffee b/src/Theming/Rice.coffee index c6aeccb21..b6f6adcfa 100644 --- a/src/Theming/Rice.coffee +++ b/src/Theming/Rice.coffee @@ -57,7 +57,7 @@ Rice = option: (e) -> e.stopPropagation() e.preventDefault() - + return if @dataset.disabled select = Rice.input @@ -83,7 +83,7 @@ Rice = {style} = ul style.cssText = "width: #{width}px; left: #{left}px;" + (if clientHeight - bottom < 200 then "bottom: #{clientHeight - top}px" else "top: #{bottom}px") - Rice.input = select = @previousSibling + Rice.input = select = @previousElementSibling nodes = [] for option in select.options