diff --git a/CHANGELOG.md b/CHANGELOG.md index 253e01cf2..b0437ddba 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ The links to individual versions below are to copies of the script with the upda ## v1.11.0 +**v1.11.0.5** *(2015-06-20)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.0.5/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.0.5/builds/4chan-X-noupdate.crx "Chromium version")] +- Add `Captcha Language` setting in the `Advanced` panel. +- Minor bugfixes. + **v1.11.0.4** *(2015-06-20)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.0.4/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.0.4/builds/4chan-X-noupdate.crx "Chromium version")] - Noscript captcha improvements, including the ability to click the image rather than the little checkbox. diff --git a/builds/4chan-X-beta.crx b/builds/4chan-X-beta.crx index 48d0d3022..360b967ac 100644 Binary files a/builds/4chan-X-beta.crx and b/builds/4chan-X-beta.crx differ diff --git a/builds/4chan-X-beta.meta.js b/builds/4chan-X-beta.meta.js index fed862d07..0b64f4089 100644 --- a/builds/4chan-X-beta.meta.js +++ b/builds/4chan-X-beta.meta.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X beta -// @version 1.11.0.4 +// @version 1.11.0.5 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -14,7 +14,7 @@ // @match *://www.4chan.org/feedback // @match https://www.google.com/recaptcha/api2/anchor?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc* // @match https://www.google.com/recaptcha/api2/frame?*&k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc* -// @match *://www.google.com/recaptcha/api/fallback?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc +// @match *://www.google.com/recaptcha/api/fallback?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc* // @grant GM_getValue // @grant GM_setValue // @grant GM_deleteValue diff --git a/builds/4chan-X-beta.user.js b/builds/4chan-X-beta.user.js index 7d72315b5..1d2753046 100644 --- a/builds/4chan-X-beta.user.js +++ b/builds/4chan-X-beta.user.js @@ -1,7 +1,7 @@ // Generated by CoffeeScript // ==UserScript== // @name 4chan X beta -// @version 1.11.0.4 +// @version 1.11.0.5 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -15,7 +15,7 @@ // @match *://www.4chan.org/feedback // @match https://www.google.com/recaptcha/api2/anchor?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc* // @match https://www.google.com/recaptcha/api2/frame?*&k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc* -// @match *://www.google.com/recaptcha/api/fallback?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc +// @match *://www.google.com/recaptcha/api/fallback?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc* // @grant GM_getValue // @grant GM_setValue // @grant GM_deleteValue @@ -325,6 +325,7 @@ QR: { 'QR.personas': "#options:\"sage\";boards:jp;always" }, + captchaLanguage: '', time: '%m/%d/%y(%a)%H:%M:%S', backlink: '>>%id', fileInfo: '%l (%p%s, %r%g)', @@ -399,7 +400,7 @@ doc = d.documentElement; g = { - VERSION: '1.11.0.4', + VERSION: '1.11.0.5', NAMESPACE: '4chan X.', boards: {} }; @@ -7730,6 +7731,33 @@ } }; + Captcha.language = { + init: function() { + if (!(Conf['captchaLanguage'].trim() && d.cookie.indexOf('pass_enabled=1') < 0 && !Conf['Hide Original Post Form'])) { + return; + } + return $.onExists(doc, '#captchaFormPart', true, function(node) { + return $.onExists(node, 'iframe', true, Captcha.language.fixIframe); + }); + }, + fixPage: function() { + if (!(Conf['captchaLanguage'].trim() && d.cookie.indexOf('pass_enabled=1') < 0)) { + return; + } + return $.onExists(doc, 'iframe', true, Captcha.language.fixIframe); + }, + fixIframe: function(el) { + var lang, src; + if (!(lang = Conf['captchaLanguage'].trim())) { + return; + } + src = /[?&]hl=/.test(el.src) ? el.src.replace(/([?&]hl=)[^&]*/, '$1' + encodeURIComponent(lang)) : el.src + ("&hl=" + (encodeURIComponent(lang))); + if (el.src !== src) { + return el.src = src; + } + } + }; + Captcha.noscript = { initFrame: function() { var cb, conn, img, ref, ref1; @@ -7766,7 +7794,6 @@ Captcha.v2 = { lifetime: 2 * $.MINUTE, - noscriptURL: '//www.google.com/recaptcha/api/fallback?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc', init: function() { var counter, root; if (d.cookie.indexOf('pass_enabled=1') >= 0) { @@ -7817,6 +7844,14 @@ shouldFocus: false, timeouts: {}, postsCount: 0, + noscriptURL: function() { + var lang, url; + url = '//www.google.com/recaptcha/api/fallback?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc'; + if (lang = Conf['captchaLanguage'].trim()) { + url += "&hl=" + (encodeURIComponent(lang)); + } + return url; + }, needed: function() { var captchaCount; captchaCount = this.captchas.length; @@ -7886,7 +7921,7 @@ var iframe; iframe = $.el('iframe', { id: 'qr-captcha-iframe', - src: this.noscriptURL + src: this.noscriptURL() }); $.add(this.nodes.container, iframe); return this.conn.target = iframe.contentWindow; @@ -7911,7 +7946,7 @@ } }, setupIFrame: function(iframe) { - this.setupTime = Date.now(); + Captcha.language.fixIframe(iframe); $.addClass(QR.nodes.el, 'captcha-open'); if (QR.nodes.el.getBoundingClientRect().bottom > doc.clientHeight) { QR.nodes.el.style.top = null; @@ -8034,7 +8069,7 @@ }, reload: function() { if (this.noscript) { - return $('iframe', this.nodes.container).src = this.noscriptURL; + return $('iframe', this.nodes.container).src = this.noscriptURL(); } else { return $.globalEval('(function() {\n var container = document.querySelector("#qr .captcha-container");\n window.grecaptcha.reset(container.dataset.widgetID);\n})();'); } @@ -15225,6 +15260,7 @@ if (!(/\bmode=report\b/.test(location.search) && (match = location.search.match(/\bno=(\d+)/)))) { return; } + Captcha.language.fixPage(); this.postID = +match[1]; return $.ready(this.ready); }, @@ -15792,7 +15828,7 @@ return; } $.extend(div, { - innerHTML: "
Filter is disabled.

Use regular expressions, one per line.
Lines starting with a # will be ignored.
For example, /weeaboo/i will filter posts containing the string \`weeaboo\`, case-insensitive.
MD5 filtering uses exact string matching, not regular expressions.

Note: If you're using the native catalog rather than 4chan X's catalog, 4chan X's filters do not apply there.
The native catalog has its own separate filter list.

" + innerHTML: "
Filter is disabled.

Use regular expressions, one per line.
Lines starting with a # will be ignored.
For example, /weeaboo/i will filter posts containing the string \`weeaboo\`, case-insensitive.
MD5 filtering uses exact string matching, not regular expressions.

Note: If you're using the native catalog rather than 4chan X's catalog, 4chan X's filters do not apply there.
The native catalog has its own separate filter list.

" }); return $('.warning', div).hidden = Conf['Filter']; }, @@ -15811,7 +15847,7 @@ advanced: function(section) { var aa, applyCSS, archBoards, boardID, boardOptions, boardSelect, boards, customCSS, files, i, input, inputs, interval, item, items, k, len1, len2, len3, len4, len5, len6, len7, name, o, q, ref, ref1, ref2, ref3, ref4, ref5, ref6, row, rows, software, ta, table, u, w, warning, withCredentials, y, z; $.extend(section, { - innerHTML: "
Archiver
404 Redirect is disabled.
Thread redirectionPost fetchingFile redirection
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
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"
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
Literal %: %%
Quote Backlinks formatting is disabled.
:
File Info Formatting is disabled.
:
Link: %l (truncated), %L (untruncated), %T (4chan filename)
Filename: %n (truncated), %N (untruncated), %t (4chan filename)
Spoiler indicator: %p
Size: %B (Bytes), %K (KB), %M (MB), %s (4chan default)
Resolution: %r (Displays 'PDF' for PDF files)
Tag: %g
Literal %: %%
Quick Reply Personas

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.
Thread Updater is disabled.
Interval: seconds
Custom Cooldown Time
Seconds:
" + innerHTML: "
Archiver
404 Redirect is disabled.
Thread redirectionPost fetchingFile redirection
Captcha Language
Choose from list of language codes. Leave blank to autoselect.
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
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"
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
Literal %: %%
Quote Backlinks formatting is disabled.
:
File Info Formatting is disabled.
:
Link: %l (truncated), %L (untruncated), %T (4chan filename)
Filename: %n (truncated), %N (untruncated), %t (4chan filename)
Spoiler indicator: %p
Size: %B (Bytes), %K (KB), %M (MB), %s (4chan default)
Resolution: %r (Displays 'PDF' for PDF files)
Tag: %g
Literal %: %%
Quick Reply Personas

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.
Thread Updater is disabled.
Interval: seconds
Custom Cooldown Time
Seconds:
" }); ref = $$('.warning', section); for (k = 0, len1 = ref.length; k < len1; k++) { @@ -15820,7 +15856,7 @@ } items = {}; inputs = {}; - ref1 = ['boardnav', 'time', 'backlink', 'fileInfo', 'favicon', 'usercss', 'customCooldown']; + ref1 = ['captchaLanguage', 'boardnav', 'time', 'backlink', 'fileInfo', 'favicon', 'usercss', 'customCooldown']; for (q = 0, len2 = ref1.length; q < len2; q++) { name = ref1[q]; input = $("[name='" + name + "']", section); @@ -15833,7 +15869,9 @@ $.on(input, 'change', Settings[name]); } else { $.on(input, 'input', $.cb.value); - $.on(input, 'input', Settings[name]); + if (name in Settings) { + $.on(input, 'input', Settings[name]); + } } } ta = $('.personafield', section); @@ -15847,10 +15885,9 @@ val = items[key]; input = inputs[key]; input.value = val; - if (key === 'usercss' || key === 'customCooldown') { - continue; + if (key in Settings && key !== 'usercss') { + Settings[key].call(input); } - Settings[key].call(input); } }); interval = $('input[name="Interval"]', section); @@ -16107,6 +16144,13 @@ $.onExists(d.documentElement, 'body', false, function() { return $.addStyle(Main.cssWWW); }); + Conf = { + 'captchaLanguage': Config.captchaLanguage + }; + $.get(Conf, function(items) { + $.extend(Conf, items); + return Captcha.language.fixPage(); + }); return; } g.threads = new SimpleDict(); @@ -17617,7 +17661,7 @@ ".section-filter textarea {\n" + " height: 500px;\n" + "}\n" + -".section-filter a {\n" + +".section-filter a, .section-advanced a {\n" + " text-decoration: underline;\n" + "}\n" + ".section-sauce textarea {\n" + @@ -18562,7 +18606,7 @@ " height: 15px;\n" + " text-align: center;\n" + "}\n" + -".menu-button + .container:not(:empty) {\n" + +".menu-button + .container :first-child {\n" + " margin-left: -5px;\n" + "}\n" + "#menu {\n" + @@ -19488,7 +19532,7 @@ "#captcha-cnt {\n" + " height: auto;\n" + "}", - features: [['Polyfill', Polyfill], ['Redirect', Redirect], ['Header', Header], ['Catalog Links', CatalogLinks], ['Settings', Settings], ['Index Generator', Index], ['Disable Autoplay', AntiAutoplay], ['Announcement Hiding', PSAHiding], ['Fourchan thingies', Fourchan], ['Color User IDs', IDColor], ['Highlight by User ID', IDHighlight], ['Custom CSS', CustomCSS], ['Linkify', Linkify], ['Reveal Spoilers', RemoveSpoilers], ['Resurrect Quotes', Quotify], ['Filter', Filter], ['Thread Hiding Buttons', ThreadHiding], ['Reply Hiding Buttons', PostHiding], ['Recursive', Recursive], ['Strike-through Quotes', QuoteStrikeThrough], ['Quick Reply', QR], ['Menu', Menu], ['Index Generator (Menu)', Index.menu], ['Report Link', ReportLink], ['Thread Hiding (Menu)', ThreadHiding.menu], ['Reply Hiding (Menu)', PostHiding.menu], ['Delete Link', DeleteLink], ['Filter (Menu)', Filter.menu], ['Download Link', DownloadLink], ['Archive Link', ArchiveLink], ['Quote Inlining', QuoteInline], ['Quote Previewing', QuotePreview], ['Quote Backlinks', QuoteBacklink], ['Mark Quotes of You', QuoteYou], ['Mark OP Quotes', QuoteOP], ['Mark Cross-thread Quotes', QuoteCT], ['Anonymize', Anonymize], ['Time Formatting', Time], ['Relative Post Dates', RelativeDates], ['File Info Formatting', FileInfo], ['Fappe Tyme', FappeTyme], ['Gallery', Gallery], ['Gallery (menu)', Gallery.menu], ['Sauce', Sauce], ['Image Expansion', ImageExpand], ['Image Expansion (Menu)', ImageExpand.menu], ['Reveal Spoiler Thumbnails', RevealSpoilers], ['Image Loading', ImageLoader], ['Image Hover', ImageHover], ['Volume Control', Volume], ['WEBM Metadata', Metadata], ['Comment Expansion', ExpandComment], ['Thread Expansion', ExpandThread], ['Thread Excerpt', ThreadExcerpt], ['Favicon', Favicon], ['Unread', Unread], ['Quote Threading', QuoteThreading], ['Thread Stats', ThreadStats], ['Thread Updater', ThreadUpdater], ['Thread Watcher', ThreadWatcher], ['Thread Watcher (Menu)', ThreadWatcher.menu], ['Mark New IPs', MarkNewIPs], ['Index Navigation', Nav], ['Keybinds', Keybinds], ['Banner', Banner], ['Flash Features', Flash]] + features: [['Polyfill', Polyfill], ['Captcha Language', Captcha.language], ['Redirect', Redirect], ['Header', Header], ['Catalog Links', CatalogLinks], ['Settings', Settings], ['Index Generator', Index], ['Disable Autoplay', AntiAutoplay], ['Announcement Hiding', PSAHiding], ['Fourchan thingies', Fourchan], ['Color User IDs', IDColor], ['Highlight by User ID', IDHighlight], ['Custom CSS', CustomCSS], ['Linkify', Linkify], ['Reveal Spoilers', RemoveSpoilers], ['Resurrect Quotes', Quotify], ['Filter', Filter], ['Thread Hiding Buttons', ThreadHiding], ['Reply Hiding Buttons', PostHiding], ['Recursive', Recursive], ['Strike-through Quotes', QuoteStrikeThrough], ['Quick Reply', QR], ['Menu', Menu], ['Index Generator (Menu)', Index.menu], ['Report Link', ReportLink], ['Thread Hiding (Menu)', ThreadHiding.menu], ['Reply Hiding (Menu)', PostHiding.menu], ['Delete Link', DeleteLink], ['Filter (Menu)', Filter.menu], ['Download Link', DownloadLink], ['Archive Link', ArchiveLink], ['Quote Inlining', QuoteInline], ['Quote Previewing', QuotePreview], ['Quote Backlinks', QuoteBacklink], ['Mark Quotes of You', QuoteYou], ['Mark OP Quotes', QuoteOP], ['Mark Cross-thread Quotes', QuoteCT], ['Anonymize', Anonymize], ['Time Formatting', Time], ['Relative Post Dates', RelativeDates], ['File Info Formatting', FileInfo], ['Fappe Tyme', FappeTyme], ['Gallery', Gallery], ['Gallery (menu)', Gallery.menu], ['Sauce', Sauce], ['Image Expansion', ImageExpand], ['Image Expansion (Menu)', ImageExpand.menu], ['Reveal Spoiler Thumbnails', RevealSpoilers], ['Image Loading', ImageLoader], ['Image Hover', ImageHover], ['Volume Control', Volume], ['WEBM Metadata', Metadata], ['Comment Expansion', ExpandComment], ['Thread Expansion', ExpandThread], ['Thread Excerpt', ThreadExcerpt], ['Favicon', Favicon], ['Unread', Unread], ['Quote Threading', QuoteThreading], ['Thread Stats', ThreadStats], ['Thread Updater', ThreadUpdater], ['Thread Watcher', ThreadWatcher], ['Thread Watcher (Menu)', ThreadWatcher.menu], ['Mark New IPs', MarkNewIPs], ['Index Navigation', Nav], ['Keybinds', Keybinds], ['Banner', Banner], ['Flash Features', Flash]] }; Main.init(); diff --git a/builds/4chan-X-noupdate.crx b/builds/4chan-X-noupdate.crx index 71f4745ef..b4c677b2a 100644 Binary files a/builds/4chan-X-noupdate.crx and b/builds/4chan-X-noupdate.crx differ diff --git a/builds/4chan-X-noupdate.user.js b/builds/4chan-X-noupdate.user.js index d61524182..924317734 100644 --- a/builds/4chan-X-noupdate.user.js +++ b/builds/4chan-X-noupdate.user.js @@ -1,7 +1,7 @@ // Generated by CoffeeScript // ==UserScript== // @name 4chan X -// @version 1.11.0.4 +// @version 1.11.0.5 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -15,7 +15,7 @@ // @match *://www.4chan.org/feedback // @match https://www.google.com/recaptcha/api2/anchor?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc* // @match https://www.google.com/recaptcha/api2/frame?*&k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc* -// @match *://www.google.com/recaptcha/api/fallback?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc +// @match *://www.google.com/recaptcha/api/fallback?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc* // @grant GM_getValue // @grant GM_setValue // @grant GM_deleteValue @@ -324,6 +324,7 @@ QR: { 'QR.personas': "#options:\"sage\";boards:jp;always" }, + captchaLanguage: '', time: '%m/%d/%y(%a)%H:%M:%S', backlink: '>>%id', fileInfo: '%l (%p%s, %r%g)', @@ -398,7 +399,7 @@ doc = d.documentElement; g = { - VERSION: '1.11.0.4', + VERSION: '1.11.0.5', NAMESPACE: '4chan X.', boards: {} }; @@ -7729,6 +7730,33 @@ } }; + Captcha.language = { + init: function() { + if (!(Conf['captchaLanguage'].trim() && d.cookie.indexOf('pass_enabled=1') < 0 && !Conf['Hide Original Post Form'])) { + return; + } + return $.onExists(doc, '#captchaFormPart', true, function(node) { + return $.onExists(node, 'iframe', true, Captcha.language.fixIframe); + }); + }, + fixPage: function() { + if (!(Conf['captchaLanguage'].trim() && d.cookie.indexOf('pass_enabled=1') < 0)) { + return; + } + return $.onExists(doc, 'iframe', true, Captcha.language.fixIframe); + }, + fixIframe: function(el) { + var lang, src; + if (!(lang = Conf['captchaLanguage'].trim())) { + return; + } + src = /[?&]hl=/.test(el.src) ? el.src.replace(/([?&]hl=)[^&]*/, '$1' + encodeURIComponent(lang)) : el.src + ("&hl=" + (encodeURIComponent(lang))); + if (el.src !== src) { + return el.src = src; + } + } + }; + Captcha.noscript = { initFrame: function() { var cb, conn, img, ref, ref1; @@ -7765,7 +7793,6 @@ Captcha.v2 = { lifetime: 2 * $.MINUTE, - noscriptURL: '//www.google.com/recaptcha/api/fallback?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc', init: function() { var counter, root; if (d.cookie.indexOf('pass_enabled=1') >= 0) { @@ -7816,6 +7843,14 @@ shouldFocus: false, timeouts: {}, postsCount: 0, + noscriptURL: function() { + var lang, url; + url = '//www.google.com/recaptcha/api/fallback?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc'; + if (lang = Conf['captchaLanguage'].trim()) { + url += "&hl=" + (encodeURIComponent(lang)); + } + return url; + }, needed: function() { var captchaCount; captchaCount = this.captchas.length; @@ -7885,7 +7920,7 @@ var iframe; iframe = $.el('iframe', { id: 'qr-captcha-iframe', - src: this.noscriptURL + src: this.noscriptURL() }); $.add(this.nodes.container, iframe); return this.conn.target = iframe.contentWindow; @@ -7910,7 +7945,7 @@ } }, setupIFrame: function(iframe) { - this.setupTime = Date.now(); + Captcha.language.fixIframe(iframe); $.addClass(QR.nodes.el, 'captcha-open'); if (QR.nodes.el.getBoundingClientRect().bottom > doc.clientHeight) { QR.nodes.el.style.top = null; @@ -8033,7 +8068,7 @@ }, reload: function() { if (this.noscript) { - return $('iframe', this.nodes.container).src = this.noscriptURL; + return $('iframe', this.nodes.container).src = this.noscriptURL(); } else { return $.globalEval('(function() {\n var container = document.querySelector("#qr .captcha-container");\n window.grecaptcha.reset(container.dataset.widgetID);\n})();'); } @@ -15224,6 +15259,7 @@ if (!(/\bmode=report\b/.test(location.search) && (match = location.search.match(/\bno=(\d+)/)))) { return; } + Captcha.language.fixPage(); this.postID = +match[1]; return $.ready(this.ready); }, @@ -15791,7 +15827,7 @@ return; } $.extend(div, { - innerHTML: "
Filter is disabled.

Use regular expressions, one per line.
Lines starting with a # will be ignored.
For example, /weeaboo/i will filter posts containing the string \`weeaboo\`, case-insensitive.
MD5 filtering uses exact string matching, not regular expressions.

Note: If you're using the native catalog rather than 4chan X's catalog, 4chan X's filters do not apply there.
The native catalog has its own separate filter list.

" + innerHTML: "
Filter is disabled.

Use regular expressions, one per line.
Lines starting with a # will be ignored.
For example, /weeaboo/i will filter posts containing the string \`weeaboo\`, case-insensitive.
MD5 filtering uses exact string matching, not regular expressions.

Note: If you're using the native catalog rather than 4chan X's catalog, 4chan X's filters do not apply there.
The native catalog has its own separate filter list.

" }); return $('.warning', div).hidden = Conf['Filter']; }, @@ -15810,7 +15846,7 @@ advanced: function(section) { var aa, applyCSS, archBoards, boardID, boardOptions, boardSelect, boards, customCSS, files, i, input, inputs, interval, item, items, k, len1, len2, len3, len4, len5, len6, len7, name, o, q, ref, ref1, ref2, ref3, ref4, ref5, ref6, row, rows, software, ta, table, u, w, warning, withCredentials, y, z; $.extend(section, { - innerHTML: "
Archiver
404 Redirect is disabled.
Thread redirectionPost fetchingFile redirection
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
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"
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
Literal %: %%
Quote Backlinks formatting is disabled.
:
File Info Formatting is disabled.
:
Link: %l (truncated), %L (untruncated), %T (4chan filename)
Filename: %n (truncated), %N (untruncated), %t (4chan filename)
Spoiler indicator: %p
Size: %B (Bytes), %K (KB), %M (MB), %s (4chan default)
Resolution: %r (Displays 'PDF' for PDF files)
Tag: %g
Literal %: %%
Quick Reply Personas

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.
Thread Updater is disabled.
Interval: seconds
Custom Cooldown Time
Seconds:
" + innerHTML: "
Archiver
404 Redirect is disabled.
Thread redirectionPost fetchingFile redirection
Captcha Language
Choose from list of language codes. Leave blank to autoselect.
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
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"
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
Literal %: %%
Quote Backlinks formatting is disabled.
:
File Info Formatting is disabled.
:
Link: %l (truncated), %L (untruncated), %T (4chan filename)
Filename: %n (truncated), %N (untruncated), %t (4chan filename)
Spoiler indicator: %p
Size: %B (Bytes), %K (KB), %M (MB), %s (4chan default)
Resolution: %r (Displays 'PDF' for PDF files)
Tag: %g
Literal %: %%
Quick Reply Personas

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.
Thread Updater is disabled.
Interval: seconds
Custom Cooldown Time
Seconds:
" }); ref = $$('.warning', section); for (k = 0, len1 = ref.length; k < len1; k++) { @@ -15819,7 +15855,7 @@ } items = {}; inputs = {}; - ref1 = ['boardnav', 'time', 'backlink', 'fileInfo', 'favicon', 'usercss', 'customCooldown']; + ref1 = ['captchaLanguage', 'boardnav', 'time', 'backlink', 'fileInfo', 'favicon', 'usercss', 'customCooldown']; for (q = 0, len2 = ref1.length; q < len2; q++) { name = ref1[q]; input = $("[name='" + name + "']", section); @@ -15832,7 +15868,9 @@ $.on(input, 'change', Settings[name]); } else { $.on(input, 'input', $.cb.value); - $.on(input, 'input', Settings[name]); + if (name in Settings) { + $.on(input, 'input', Settings[name]); + } } } ta = $('.personafield', section); @@ -15846,10 +15884,9 @@ val = items[key]; input = inputs[key]; input.value = val; - if (key === 'usercss' || key === 'customCooldown') { - continue; + if (key in Settings && key !== 'usercss') { + Settings[key].call(input); } - Settings[key].call(input); } }); interval = $('input[name="Interval"]', section); @@ -16106,6 +16143,13 @@ $.onExists(d.documentElement, 'body', false, function() { return $.addStyle(Main.cssWWW); }); + Conf = { + 'captchaLanguage': Config.captchaLanguage + }; + $.get(Conf, function(items) { + $.extend(Conf, items); + return Captcha.language.fixPage(); + }); return; } g.threads = new SimpleDict(); @@ -17616,7 +17660,7 @@ ".section-filter textarea {\n" + " height: 500px;\n" + "}\n" + -".section-filter a {\n" + +".section-filter a, .section-advanced a {\n" + " text-decoration: underline;\n" + "}\n" + ".section-sauce textarea {\n" + @@ -18561,7 +18605,7 @@ " height: 15px;\n" + " text-align: center;\n" + "}\n" + -".menu-button + .container:not(:empty) {\n" + +".menu-button + .container :first-child {\n" + " margin-left: -5px;\n" + "}\n" + "#menu {\n" + @@ -19487,7 +19531,7 @@ "#captcha-cnt {\n" + " height: auto;\n" + "}", - features: [['Polyfill', Polyfill], ['Redirect', Redirect], ['Header', Header], ['Catalog Links', CatalogLinks], ['Settings', Settings], ['Index Generator', Index], ['Disable Autoplay', AntiAutoplay], ['Announcement Hiding', PSAHiding], ['Fourchan thingies', Fourchan], ['Color User IDs', IDColor], ['Highlight by User ID', IDHighlight], ['Custom CSS', CustomCSS], ['Linkify', Linkify], ['Reveal Spoilers', RemoveSpoilers], ['Resurrect Quotes', Quotify], ['Filter', Filter], ['Thread Hiding Buttons', ThreadHiding], ['Reply Hiding Buttons', PostHiding], ['Recursive', Recursive], ['Strike-through Quotes', QuoteStrikeThrough], ['Quick Reply', QR], ['Menu', Menu], ['Index Generator (Menu)', Index.menu], ['Report Link', ReportLink], ['Thread Hiding (Menu)', ThreadHiding.menu], ['Reply Hiding (Menu)', PostHiding.menu], ['Delete Link', DeleteLink], ['Filter (Menu)', Filter.menu], ['Download Link', DownloadLink], ['Archive Link', ArchiveLink], ['Quote Inlining', QuoteInline], ['Quote Previewing', QuotePreview], ['Quote Backlinks', QuoteBacklink], ['Mark Quotes of You', QuoteYou], ['Mark OP Quotes', QuoteOP], ['Mark Cross-thread Quotes', QuoteCT], ['Anonymize', Anonymize], ['Time Formatting', Time], ['Relative Post Dates', RelativeDates], ['File Info Formatting', FileInfo], ['Fappe Tyme', FappeTyme], ['Gallery', Gallery], ['Gallery (menu)', Gallery.menu], ['Sauce', Sauce], ['Image Expansion', ImageExpand], ['Image Expansion (Menu)', ImageExpand.menu], ['Reveal Spoiler Thumbnails', RevealSpoilers], ['Image Loading', ImageLoader], ['Image Hover', ImageHover], ['Volume Control', Volume], ['WEBM Metadata', Metadata], ['Comment Expansion', ExpandComment], ['Thread Expansion', ExpandThread], ['Thread Excerpt', ThreadExcerpt], ['Favicon', Favicon], ['Unread', Unread], ['Quote Threading', QuoteThreading], ['Thread Stats', ThreadStats], ['Thread Updater', ThreadUpdater], ['Thread Watcher', ThreadWatcher], ['Thread Watcher (Menu)', ThreadWatcher.menu], ['Mark New IPs', MarkNewIPs], ['Index Navigation', Nav], ['Keybinds', Keybinds], ['Banner', Banner], ['Flash Features', Flash]] + features: [['Polyfill', Polyfill], ['Captcha Language', Captcha.language], ['Redirect', Redirect], ['Header', Header], ['Catalog Links', CatalogLinks], ['Settings', Settings], ['Index Generator', Index], ['Disable Autoplay', AntiAutoplay], ['Announcement Hiding', PSAHiding], ['Fourchan thingies', Fourchan], ['Color User IDs', IDColor], ['Highlight by User ID', IDHighlight], ['Custom CSS', CustomCSS], ['Linkify', Linkify], ['Reveal Spoilers', RemoveSpoilers], ['Resurrect Quotes', Quotify], ['Filter', Filter], ['Thread Hiding Buttons', ThreadHiding], ['Reply Hiding Buttons', PostHiding], ['Recursive', Recursive], ['Strike-through Quotes', QuoteStrikeThrough], ['Quick Reply', QR], ['Menu', Menu], ['Index Generator (Menu)', Index.menu], ['Report Link', ReportLink], ['Thread Hiding (Menu)', ThreadHiding.menu], ['Reply Hiding (Menu)', PostHiding.menu], ['Delete Link', DeleteLink], ['Filter (Menu)', Filter.menu], ['Download Link', DownloadLink], ['Archive Link', ArchiveLink], ['Quote Inlining', QuoteInline], ['Quote Previewing', QuotePreview], ['Quote Backlinks', QuoteBacklink], ['Mark Quotes of You', QuoteYou], ['Mark OP Quotes', QuoteOP], ['Mark Cross-thread Quotes', QuoteCT], ['Anonymize', Anonymize], ['Time Formatting', Time], ['Relative Post Dates', RelativeDates], ['File Info Formatting', FileInfo], ['Fappe Tyme', FappeTyme], ['Gallery', Gallery], ['Gallery (menu)', Gallery.menu], ['Sauce', Sauce], ['Image Expansion', ImageExpand], ['Image Expansion (Menu)', ImageExpand.menu], ['Reveal Spoiler Thumbnails', RevealSpoilers], ['Image Loading', ImageLoader], ['Image Hover', ImageHover], ['Volume Control', Volume], ['WEBM Metadata', Metadata], ['Comment Expansion', ExpandComment], ['Thread Expansion', ExpandThread], ['Thread Excerpt', ThreadExcerpt], ['Favicon', Favicon], ['Unread', Unread], ['Quote Threading', QuoteThreading], ['Thread Stats', ThreadStats], ['Thread Updater', ThreadUpdater], ['Thread Watcher', ThreadWatcher], ['Thread Watcher (Menu)', ThreadWatcher.menu], ['Mark New IPs', MarkNewIPs], ['Index Navigation', Nav], ['Keybinds', Keybinds], ['Banner', Banner], ['Flash Features', Flash]] }; Main.init(); diff --git a/builds/4chan-X.crx b/builds/4chan-X.crx index 37b0eec39..d5fa497a5 100644 Binary files a/builds/4chan-X.crx and b/builds/4chan-X.crx differ diff --git a/builds/4chan-X.meta.js b/builds/4chan-X.meta.js index 7dc3ea6da..511f18ea4 100644 --- a/builds/4chan-X.meta.js +++ b/builds/4chan-X.meta.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X -// @version 1.11.0.4 +// @version 1.11.0.5 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -14,7 +14,7 @@ // @match *://www.4chan.org/feedback // @match https://www.google.com/recaptcha/api2/anchor?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc* // @match https://www.google.com/recaptcha/api2/frame?*&k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc* -// @match *://www.google.com/recaptcha/api/fallback?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc +// @match *://www.google.com/recaptcha/api/fallback?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc* // @grant GM_getValue // @grant GM_setValue // @grant GM_deleteValue diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 4ca73c5a7..bc3b9718c 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -1,7 +1,7 @@ // Generated by CoffeeScript // ==UserScript== // @name 4chan X -// @version 1.11.0.4 +// @version 1.11.0.5 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -15,7 +15,7 @@ // @match *://www.4chan.org/feedback // @match https://www.google.com/recaptcha/api2/anchor?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc* // @match https://www.google.com/recaptcha/api2/frame?*&k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc* -// @match *://www.google.com/recaptcha/api/fallback?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc +// @match *://www.google.com/recaptcha/api/fallback?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc* // @grant GM_getValue // @grant GM_setValue // @grant GM_deleteValue @@ -325,6 +325,7 @@ QR: { 'QR.personas': "#options:\"sage\";boards:jp;always" }, + captchaLanguage: '', time: '%m/%d/%y(%a)%H:%M:%S', backlink: '>>%id', fileInfo: '%l (%p%s, %r%g)', @@ -399,7 +400,7 @@ doc = d.documentElement; g = { - VERSION: '1.11.0.4', + VERSION: '1.11.0.5', NAMESPACE: '4chan X.', boards: {} }; @@ -7730,6 +7731,33 @@ } }; + Captcha.language = { + init: function() { + if (!(Conf['captchaLanguage'].trim() && d.cookie.indexOf('pass_enabled=1') < 0 && !Conf['Hide Original Post Form'])) { + return; + } + return $.onExists(doc, '#captchaFormPart', true, function(node) { + return $.onExists(node, 'iframe', true, Captcha.language.fixIframe); + }); + }, + fixPage: function() { + if (!(Conf['captchaLanguage'].trim() && d.cookie.indexOf('pass_enabled=1') < 0)) { + return; + } + return $.onExists(doc, 'iframe', true, Captcha.language.fixIframe); + }, + fixIframe: function(el) { + var lang, src; + if (!(lang = Conf['captchaLanguage'].trim())) { + return; + } + src = /[?&]hl=/.test(el.src) ? el.src.replace(/([?&]hl=)[^&]*/, '$1' + encodeURIComponent(lang)) : el.src + ("&hl=" + (encodeURIComponent(lang))); + if (el.src !== src) { + return el.src = src; + } + } + }; + Captcha.noscript = { initFrame: function() { var cb, conn, img, ref, ref1; @@ -7766,7 +7794,6 @@ Captcha.v2 = { lifetime: 2 * $.MINUTE, - noscriptURL: '//www.google.com/recaptcha/api/fallback?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc', init: function() { var counter, root; if (d.cookie.indexOf('pass_enabled=1') >= 0) { @@ -7817,6 +7844,14 @@ shouldFocus: false, timeouts: {}, postsCount: 0, + noscriptURL: function() { + var lang, url; + url = '//www.google.com/recaptcha/api/fallback?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc'; + if (lang = Conf['captchaLanguage'].trim()) { + url += "&hl=" + (encodeURIComponent(lang)); + } + return url; + }, needed: function() { var captchaCount; captchaCount = this.captchas.length; @@ -7886,7 +7921,7 @@ var iframe; iframe = $.el('iframe', { id: 'qr-captcha-iframe', - src: this.noscriptURL + src: this.noscriptURL() }); $.add(this.nodes.container, iframe); return this.conn.target = iframe.contentWindow; @@ -7911,7 +7946,7 @@ } }, setupIFrame: function(iframe) { - this.setupTime = Date.now(); + Captcha.language.fixIframe(iframe); $.addClass(QR.nodes.el, 'captcha-open'); if (QR.nodes.el.getBoundingClientRect().bottom > doc.clientHeight) { QR.nodes.el.style.top = null; @@ -8034,7 +8069,7 @@ }, reload: function() { if (this.noscript) { - return $('iframe', this.nodes.container).src = this.noscriptURL; + return $('iframe', this.nodes.container).src = this.noscriptURL(); } else { return $.globalEval('(function() {\n var container = document.querySelector("#qr .captcha-container");\n window.grecaptcha.reset(container.dataset.widgetID);\n})();'); } @@ -15225,6 +15260,7 @@ if (!(/\bmode=report\b/.test(location.search) && (match = location.search.match(/\bno=(\d+)/)))) { return; } + Captcha.language.fixPage(); this.postID = +match[1]; return $.ready(this.ready); }, @@ -15792,7 +15828,7 @@ return; } $.extend(div, { - innerHTML: "
Filter is disabled.

Use regular expressions, one per line.
Lines starting with a # will be ignored.
For example, /weeaboo/i will filter posts containing the string \`weeaboo\`, case-insensitive.
MD5 filtering uses exact string matching, not regular expressions.

Note: If you're using the native catalog rather than 4chan X's catalog, 4chan X's filters do not apply there.
The native catalog has its own separate filter list.

" + innerHTML: "
Filter is disabled.

Use regular expressions, one per line.
Lines starting with a # will be ignored.
For example, /weeaboo/i will filter posts containing the string \`weeaboo\`, case-insensitive.
MD5 filtering uses exact string matching, not regular expressions.

Note: If you're using the native catalog rather than 4chan X's catalog, 4chan X's filters do not apply there.
The native catalog has its own separate filter list.

" }); return $('.warning', div).hidden = Conf['Filter']; }, @@ -15811,7 +15847,7 @@ advanced: function(section) { var aa, applyCSS, archBoards, boardID, boardOptions, boardSelect, boards, customCSS, files, i, input, inputs, interval, item, items, k, len1, len2, len3, len4, len5, len6, len7, name, o, q, ref, ref1, ref2, ref3, ref4, ref5, ref6, row, rows, software, ta, table, u, w, warning, withCredentials, y, z; $.extend(section, { - innerHTML: "
Archiver
404 Redirect is disabled.
Thread redirectionPost fetchingFile redirection
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
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"
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
Literal %: %%
Quote Backlinks formatting is disabled.
:
File Info Formatting is disabled.
:
Link: %l (truncated), %L (untruncated), %T (4chan filename)
Filename: %n (truncated), %N (untruncated), %t (4chan filename)
Spoiler indicator: %p
Size: %B (Bytes), %K (KB), %M (MB), %s (4chan default)
Resolution: %r (Displays 'PDF' for PDF files)
Tag: %g
Literal %: %%
Quick Reply Personas

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.
Thread Updater is disabled.
Interval: seconds
Custom Cooldown Time
Seconds:
" + innerHTML: "
Archiver
404 Redirect is disabled.
Thread redirectionPost fetchingFile redirection
Captcha Language
Choose from list of language codes. Leave blank to autoselect.
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
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"
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
Literal %: %%
Quote Backlinks formatting is disabled.
:
File Info Formatting is disabled.
:
Link: %l (truncated), %L (untruncated), %T (4chan filename)
Filename: %n (truncated), %N (untruncated), %t (4chan filename)
Spoiler indicator: %p
Size: %B (Bytes), %K (KB), %M (MB), %s (4chan default)
Resolution: %r (Displays 'PDF' for PDF files)
Tag: %g
Literal %: %%
Quick Reply Personas

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.
Thread Updater is disabled.
Interval: seconds
Custom Cooldown Time
Seconds:
" }); ref = $$('.warning', section); for (k = 0, len1 = ref.length; k < len1; k++) { @@ -15820,7 +15856,7 @@ } items = {}; inputs = {}; - ref1 = ['boardnav', 'time', 'backlink', 'fileInfo', 'favicon', 'usercss', 'customCooldown']; + ref1 = ['captchaLanguage', 'boardnav', 'time', 'backlink', 'fileInfo', 'favicon', 'usercss', 'customCooldown']; for (q = 0, len2 = ref1.length; q < len2; q++) { name = ref1[q]; input = $("[name='" + name + "']", section); @@ -15833,7 +15869,9 @@ $.on(input, 'change', Settings[name]); } else { $.on(input, 'input', $.cb.value); - $.on(input, 'input', Settings[name]); + if (name in Settings) { + $.on(input, 'input', Settings[name]); + } } } ta = $('.personafield', section); @@ -15847,10 +15885,9 @@ val = items[key]; input = inputs[key]; input.value = val; - if (key === 'usercss' || key === 'customCooldown') { - continue; + if (key in Settings && key !== 'usercss') { + Settings[key].call(input); } - Settings[key].call(input); } }); interval = $('input[name="Interval"]', section); @@ -16107,6 +16144,13 @@ $.onExists(d.documentElement, 'body', false, function() { return $.addStyle(Main.cssWWW); }); + Conf = { + 'captchaLanguage': Config.captchaLanguage + }; + $.get(Conf, function(items) { + $.extend(Conf, items); + return Captcha.language.fixPage(); + }); return; } g.threads = new SimpleDict(); @@ -17617,7 +17661,7 @@ ".section-filter textarea {\n" + " height: 500px;\n" + "}\n" + -".section-filter a {\n" + +".section-filter a, .section-advanced a {\n" + " text-decoration: underline;\n" + "}\n" + ".section-sauce textarea {\n" + @@ -18562,7 +18606,7 @@ " height: 15px;\n" + " text-align: center;\n" + "}\n" + -".menu-button + .container:not(:empty) {\n" + +".menu-button + .container :first-child {\n" + " margin-left: -5px;\n" + "}\n" + "#menu {\n" + @@ -19488,7 +19532,7 @@ "#captcha-cnt {\n" + " height: auto;\n" + "}", - features: [['Polyfill', Polyfill], ['Redirect', Redirect], ['Header', Header], ['Catalog Links', CatalogLinks], ['Settings', Settings], ['Index Generator', Index], ['Disable Autoplay', AntiAutoplay], ['Announcement Hiding', PSAHiding], ['Fourchan thingies', Fourchan], ['Color User IDs', IDColor], ['Highlight by User ID', IDHighlight], ['Custom CSS', CustomCSS], ['Linkify', Linkify], ['Reveal Spoilers', RemoveSpoilers], ['Resurrect Quotes', Quotify], ['Filter', Filter], ['Thread Hiding Buttons', ThreadHiding], ['Reply Hiding Buttons', PostHiding], ['Recursive', Recursive], ['Strike-through Quotes', QuoteStrikeThrough], ['Quick Reply', QR], ['Menu', Menu], ['Index Generator (Menu)', Index.menu], ['Report Link', ReportLink], ['Thread Hiding (Menu)', ThreadHiding.menu], ['Reply Hiding (Menu)', PostHiding.menu], ['Delete Link', DeleteLink], ['Filter (Menu)', Filter.menu], ['Download Link', DownloadLink], ['Archive Link', ArchiveLink], ['Quote Inlining', QuoteInline], ['Quote Previewing', QuotePreview], ['Quote Backlinks', QuoteBacklink], ['Mark Quotes of You', QuoteYou], ['Mark OP Quotes', QuoteOP], ['Mark Cross-thread Quotes', QuoteCT], ['Anonymize', Anonymize], ['Time Formatting', Time], ['Relative Post Dates', RelativeDates], ['File Info Formatting', FileInfo], ['Fappe Tyme', FappeTyme], ['Gallery', Gallery], ['Gallery (menu)', Gallery.menu], ['Sauce', Sauce], ['Image Expansion', ImageExpand], ['Image Expansion (Menu)', ImageExpand.menu], ['Reveal Spoiler Thumbnails', RevealSpoilers], ['Image Loading', ImageLoader], ['Image Hover', ImageHover], ['Volume Control', Volume], ['WEBM Metadata', Metadata], ['Comment Expansion', ExpandComment], ['Thread Expansion', ExpandThread], ['Thread Excerpt', ThreadExcerpt], ['Favicon', Favicon], ['Unread', Unread], ['Quote Threading', QuoteThreading], ['Thread Stats', ThreadStats], ['Thread Updater', ThreadUpdater], ['Thread Watcher', ThreadWatcher], ['Thread Watcher (Menu)', ThreadWatcher.menu], ['Mark New IPs', MarkNewIPs], ['Index Navigation', Nav], ['Keybinds', Keybinds], ['Banner', Banner], ['Flash Features', Flash]] + features: [['Polyfill', Polyfill], ['Captcha Language', Captcha.language], ['Redirect', Redirect], ['Header', Header], ['Catalog Links', CatalogLinks], ['Settings', Settings], ['Index Generator', Index], ['Disable Autoplay', AntiAutoplay], ['Announcement Hiding', PSAHiding], ['Fourchan thingies', Fourchan], ['Color User IDs', IDColor], ['Highlight by User ID', IDHighlight], ['Custom CSS', CustomCSS], ['Linkify', Linkify], ['Reveal Spoilers', RemoveSpoilers], ['Resurrect Quotes', Quotify], ['Filter', Filter], ['Thread Hiding Buttons', ThreadHiding], ['Reply Hiding Buttons', PostHiding], ['Recursive', Recursive], ['Strike-through Quotes', QuoteStrikeThrough], ['Quick Reply', QR], ['Menu', Menu], ['Index Generator (Menu)', Index.menu], ['Report Link', ReportLink], ['Thread Hiding (Menu)', ThreadHiding.menu], ['Reply Hiding (Menu)', PostHiding.menu], ['Delete Link', DeleteLink], ['Filter (Menu)', Filter.menu], ['Download Link', DownloadLink], ['Archive Link', ArchiveLink], ['Quote Inlining', QuoteInline], ['Quote Previewing', QuotePreview], ['Quote Backlinks', QuoteBacklink], ['Mark Quotes of You', QuoteYou], ['Mark OP Quotes', QuoteOP], ['Mark Cross-thread Quotes', QuoteCT], ['Anonymize', Anonymize], ['Time Formatting', Time], ['Relative Post Dates', RelativeDates], ['File Info Formatting', FileInfo], ['Fappe Tyme', FappeTyme], ['Gallery', Gallery], ['Gallery (menu)', Gallery.menu], ['Sauce', Sauce], ['Image Expansion', ImageExpand], ['Image Expansion (Menu)', ImageExpand.menu], ['Reveal Spoiler Thumbnails', RevealSpoilers], ['Image Loading', ImageLoader], ['Image Hover', ImageHover], ['Volume Control', Volume], ['WEBM Metadata', Metadata], ['Comment Expansion', ExpandComment], ['Thread Expansion', ExpandThread], ['Thread Excerpt', ThreadExcerpt], ['Favicon', Favicon], ['Unread', Unread], ['Quote Threading', QuoteThreading], ['Thread Stats', ThreadStats], ['Thread Updater', ThreadUpdater], ['Thread Watcher', ThreadWatcher], ['Thread Watcher (Menu)', ThreadWatcher.menu], ['Mark New IPs', MarkNewIPs], ['Index Navigation', Nav], ['Keybinds', Keybinds], ['Banner', Banner], ['Flash Features', Flash]] }; Main.init(); diff --git a/builds/4chan-X.zip b/builds/4chan-X.zip index ff42f9daa..3e81d4426 100644 Binary files a/builds/4chan-X.zip and b/builds/4chan-X.zip differ diff --git a/builds/updates-beta.xml b/builds/updates-beta.xml index c1e8fd8d6..53ff98466 100644 --- a/builds/updates-beta.xml +++ b/builds/updates-beta.xml @@ -1,7 +1,7 @@ - + diff --git a/builds/updates.xml b/builds/updates.xml index e67e4bc89..42e4a2d40 100644 --- a/builds/updates.xml +++ b/builds/updates.xml @@ -1,7 +1,7 @@ - + diff --git a/package.json b/package.json index b8833f0f8..0ab98fe68 100755 --- a/package.json +++ b/package.json @@ -3,8 +3,8 @@ "description": "Cross-browser userscript for maximum lurking on 4chan.", "meta": { "name": "4chan X", - "version": "1.11.0.4", - "date": "2015-06-20T18:31:37.633Z", + "version": "1.11.0.5", + "date": "2015-06-21T00:33:27.540Z", "repo": "https://github.com/ccd0/4chan-x/", "page": "https://github.com/ccd0/4chan-x", "downloads": "https://ccd0.github.io/4chan-x/builds/",