diff --git a/CHANGELOG.md b/CHANGELOG.md index a49a3ae14..bf2c1cdb3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ Sometimes the changelog has notes (not comprehensive) acknowledging people's wor ### v1.11.16 +**v1.11.16.9** *(2015-11-15)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.16.9/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.16.9/builds/4chan-X-noupdate.crx "Chromium version")] +- Nope, it's on Google's end. Bringing back scrolling prevention. + **v1.11.16.8** *(2015-11-15)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.16.8/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.16.8/builds/4chan-X-noupdate.crx "Chromium version")] - Remove obsolete captcha bug workaround that may be causing scrolling to top. diff --git a/builds/4chan-X-beta.crx b/builds/4chan-X-beta.crx index 89526d49e..54d618ef1 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 6f488fa4f..9a93576bd 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.16.8 +// @version 1.11.16.9 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X diff --git a/builds/4chan-X-beta.user.js b/builds/4chan-X-beta.user.js index a9c68be6b..7219c6c0b 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.16.8 +// @version 1.11.16.9 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -433,7 +433,7 @@ doc = d.documentElement; g = { - VERSION: '1.11.16.8', + VERSION: '1.11.16.9', NAMESPACE: '4chan X.', boards: {} }; @@ -7101,7 +7101,15 @@ return $.queueTask(function() { if (!QR.inBubble()) { QR.hasFocus = d.activeElement && QR.nodes.el.contains(d.activeElement); - return QR.nodes.el.classList.toggle('focus', QR.hasFocus); + QR.nodes.el.classList.toggle('focus', QR.hasFocus); + } + if (QR.captcha.isEnabled && QR.captcha === Captcha.v2 && !QR.captcha.noscript) { + if (QR.inCaptcha()) { + QR.scrollY = window.scrollY; + return $.on(d, 'scroll', QR.scrollLock); + } else { + return $.off(d, 'scroll', QR.scrollLock); + } } }); }, @@ -7112,6 +7120,17 @@ return getComputedStyle(el).visibility !== 'hidden' && el.getBoundingClientRect().bottom > 0; }); }, + inCaptcha: function() { + var ref; + return (((ref = d.activeElement) != null ? ref.nodeName : void 0) === 'IFRAME' && QR.nodes.el.contains(d.activeElement)) || (QR.hasFocus && QR.inBubble()); + }, + scrollLock: function() { + if (QR.inCaptcha()) { + return window.scroll(window.scrollX, QR.scrollY); + } else { + return $.off(d, 'scroll', QR.scrollLock); + } + }, hide: function() { d.activeElement.blur(); $.addClass(QR.nodes.el, 'autohide'); @@ -8744,7 +8763,7 @@ } }, watchBubbles: function(mutations) { - var k, len1, mutation, node, results; + var k, len1, mutation, node, overlay, results; results = []; for (k = 0, len1 = mutations.length; k < len1; k++) { mutation = mutations[k]; @@ -8755,9 +8774,17 @@ for (q = 0, len2 = ref.length; q < len2; q++) { node = ref[q]; if ($('iframe[src^="https://www.google.com/recaptcha/api2/frame"]', node)) { - results1.push(new MutationObserver(this.fixBubble.bind(this, node)).observe(node, { + new MutationObserver(this.fixBubble.bind(this, node)).observe(node, { attributes: true - })); + }); + if (overlay = $('div[style*="position: fixed;"]', node)) { + results1.push($.on(overlay, 'click', function() { + var ref1; + return (ref1 = $('#qr iframe')) != null ? ref1.blur() : void 0; + })); + } else { + results1.push(void 0); + } } else { results1.push(void 0); } @@ -19789,18 +19816,8 @@ "#qr .captcha-root {\n" + " position: relative;\n" + "}\n" + -"#qr .captcha-container > div {\n" + +"#qr .captcha-container > div > div {\n" + " margin: auto;\n" + -" width: 304px;\n" + -"}\n" + -"/* scrollable with scroll bar hidden; prevents scroll on space press */\n" + -":root.blink #qr .captcha-container > div {\n" + -" overflow: hidden;\n" + -"}\n" + -":root.blink #qr .captcha-container > div > div:first-of-type {\n" + -" overflow-y: scroll;\n" + -" overflow-x: hidden;\n" + -" padding-right: 15px;\n" + "}\n" + "#qr .captcha-counter {\n" + " display: block;\n" + diff --git a/builds/4chan-X-noupdate.crx b/builds/4chan-X-noupdate.crx index 0cc259776..df7bce860 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 c1f9765d8..a92ee3c0a 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.16.8 +// @version 1.11.16.9 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -433,7 +433,7 @@ doc = d.documentElement; g = { - VERSION: '1.11.16.8', + VERSION: '1.11.16.9', NAMESPACE: '4chan X.', boards: {} }; @@ -7101,7 +7101,15 @@ return $.queueTask(function() { if (!QR.inBubble()) { QR.hasFocus = d.activeElement && QR.nodes.el.contains(d.activeElement); - return QR.nodes.el.classList.toggle('focus', QR.hasFocus); + QR.nodes.el.classList.toggle('focus', QR.hasFocus); + } + if (QR.captcha.isEnabled && QR.captcha === Captcha.v2 && !QR.captcha.noscript) { + if (QR.inCaptcha()) { + QR.scrollY = window.scrollY; + return $.on(d, 'scroll', QR.scrollLock); + } else { + return $.off(d, 'scroll', QR.scrollLock); + } } }); }, @@ -7112,6 +7120,17 @@ return getComputedStyle(el).visibility !== 'hidden' && el.getBoundingClientRect().bottom > 0; }); }, + inCaptcha: function() { + var ref; + return (((ref = d.activeElement) != null ? ref.nodeName : void 0) === 'IFRAME' && QR.nodes.el.contains(d.activeElement)) || (QR.hasFocus && QR.inBubble()); + }, + scrollLock: function() { + if (QR.inCaptcha()) { + return window.scroll(window.scrollX, QR.scrollY); + } else { + return $.off(d, 'scroll', QR.scrollLock); + } + }, hide: function() { d.activeElement.blur(); $.addClass(QR.nodes.el, 'autohide'); @@ -8744,7 +8763,7 @@ } }, watchBubbles: function(mutations) { - var k, len1, mutation, node, results; + var k, len1, mutation, node, overlay, results; results = []; for (k = 0, len1 = mutations.length; k < len1; k++) { mutation = mutations[k]; @@ -8755,9 +8774,17 @@ for (q = 0, len2 = ref.length; q < len2; q++) { node = ref[q]; if ($('iframe[src^="https://www.google.com/recaptcha/api2/frame"]', node)) { - results1.push(new MutationObserver(this.fixBubble.bind(this, node)).observe(node, { + new MutationObserver(this.fixBubble.bind(this, node)).observe(node, { attributes: true - })); + }); + if (overlay = $('div[style*="position: fixed;"]', node)) { + results1.push($.on(overlay, 'click', function() { + var ref1; + return (ref1 = $('#qr iframe')) != null ? ref1.blur() : void 0; + })); + } else { + results1.push(void 0); + } } else { results1.push(void 0); } @@ -19789,18 +19816,8 @@ "#qr .captcha-root {\n" + " position: relative;\n" + "}\n" + -"#qr .captcha-container > div {\n" + +"#qr .captcha-container > div > div {\n" + " margin: auto;\n" + -" width: 304px;\n" + -"}\n" + -"/* scrollable with scroll bar hidden; prevents scroll on space press */\n" + -":root.blink #qr .captcha-container > div {\n" + -" overflow: hidden;\n" + -"}\n" + -":root.blink #qr .captcha-container > div > div:first-of-type {\n" + -" overflow-y: scroll;\n" + -" overflow-x: hidden;\n" + -" padding-right: 15px;\n" + "}\n" + "#qr .captcha-counter {\n" + " display: block;\n" + diff --git a/builds/4chan-X.crx b/builds/4chan-X.crx index 973b2a05a..bb3cb5092 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 996065c9d..4e2d7efe7 100644 --- a/builds/4chan-X.meta.js +++ b/builds/4chan-X.meta.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X -// @version 1.11.16.8 +// @version 1.11.16.9 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index c08f144b9..1ba309e1a 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.16.8 +// @version 1.11.16.9 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -433,7 +433,7 @@ doc = d.documentElement; g = { - VERSION: '1.11.16.8', + VERSION: '1.11.16.9', NAMESPACE: '4chan X.', boards: {} }; @@ -7101,7 +7101,15 @@ return $.queueTask(function() { if (!QR.inBubble()) { QR.hasFocus = d.activeElement && QR.nodes.el.contains(d.activeElement); - return QR.nodes.el.classList.toggle('focus', QR.hasFocus); + QR.nodes.el.classList.toggle('focus', QR.hasFocus); + } + if (QR.captcha.isEnabled && QR.captcha === Captcha.v2 && !QR.captcha.noscript) { + if (QR.inCaptcha()) { + QR.scrollY = window.scrollY; + return $.on(d, 'scroll', QR.scrollLock); + } else { + return $.off(d, 'scroll', QR.scrollLock); + } } }); }, @@ -7112,6 +7120,17 @@ return getComputedStyle(el).visibility !== 'hidden' && el.getBoundingClientRect().bottom > 0; }); }, + inCaptcha: function() { + var ref; + return (((ref = d.activeElement) != null ? ref.nodeName : void 0) === 'IFRAME' && QR.nodes.el.contains(d.activeElement)) || (QR.hasFocus && QR.inBubble()); + }, + scrollLock: function() { + if (QR.inCaptcha()) { + return window.scroll(window.scrollX, QR.scrollY); + } else { + return $.off(d, 'scroll', QR.scrollLock); + } + }, hide: function() { d.activeElement.blur(); $.addClass(QR.nodes.el, 'autohide'); @@ -8744,7 +8763,7 @@ } }, watchBubbles: function(mutations) { - var k, len1, mutation, node, results; + var k, len1, mutation, node, overlay, results; results = []; for (k = 0, len1 = mutations.length; k < len1; k++) { mutation = mutations[k]; @@ -8755,9 +8774,17 @@ for (q = 0, len2 = ref.length; q < len2; q++) { node = ref[q]; if ($('iframe[src^="https://www.google.com/recaptcha/api2/frame"]', node)) { - results1.push(new MutationObserver(this.fixBubble.bind(this, node)).observe(node, { + new MutationObserver(this.fixBubble.bind(this, node)).observe(node, { attributes: true - })); + }); + if (overlay = $('div[style*="position: fixed;"]', node)) { + results1.push($.on(overlay, 'click', function() { + var ref1; + return (ref1 = $('#qr iframe')) != null ? ref1.blur() : void 0; + })); + } else { + results1.push(void 0); + } } else { results1.push(void 0); } @@ -19789,18 +19816,8 @@ "#qr .captcha-root {\n" + " position: relative;\n" + "}\n" + -"#qr .captcha-container > div {\n" + +"#qr .captcha-container > div > div {\n" + " margin: auto;\n" + -" width: 304px;\n" + -"}\n" + -"/* scrollable with scroll bar hidden; prevents scroll on space press */\n" + -":root.blink #qr .captcha-container > div {\n" + -" overflow: hidden;\n" + -"}\n" + -":root.blink #qr .captcha-container > div > div:first-of-type {\n" + -" overflow-y: scroll;\n" + -" overflow-x: hidden;\n" + -" padding-right: 15px;\n" + "}\n" + "#qr .captcha-counter {\n" + " display: block;\n" + diff --git a/builds/4chan-X.zip b/builds/4chan-X.zip index 1ee90770d..28c659101 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 abdf986d8..50aefe94c 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 f3c0389d8..4036ac6de 100644 --- a/builds/updates.xml +++ b/builds/updates.xml @@ -1,7 +1,7 @@ - + diff --git a/version.json b/version.json index 9e552238e..91d6dfb7b 100644 --- a/version.json +++ b/version.json @@ -1,4 +1,4 @@ { - "version": "1.11.16.8", - "date": "2015-11-16T06:37:49.683Z" + "version": "1.11.16.9", + "date": "2015-11-16T07:43:33.133Z" }