diff --git a/CHANGELOG.md b/CHANGELOG.md index 0602e5871..848be11f6 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ Sometimes the changelog has notes (not comprehensive) acknowledging people's wor ### v1.11.14 +**v1.11.14.7** *(2015-10-30)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.14.7/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.14.7/builds/4chan-X-noupdate.crx "Chromium version")] +- Merge v1.11.13.11: Work around captcha bug causing captcha to go offscreen to the right. + **v1.11.14.6** *(2015-10-29)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.14.6/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.14.6/builds/4chan-X-noupdate.crx "Chromium version")] - Check for empty or quotelink-only comments before submitting posts on /r9k/. diff --git a/builds/4chan-X-beta.crx b/builds/4chan-X-beta.crx index 93b86d273..3c5cb3b75 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 9cf53324b..71619f3e8 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.14.6 +// @version 1.11.14.7 // @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 e994b6f7e..15fd3ecda 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.14.6 +// @version 1.11.14.7 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -414,7 +414,7 @@ doc = d.documentElement; g = { - VERSION: '1.11.14.6', + VERSION: '1.11.14.7', NAMESPACE: '4chan X.', boards: {} }; @@ -8450,13 +8450,16 @@ return e.stopPropagation(); }; })(this)); - return $.on(window, 'captcha:success', (function(_this) { + $.on(window, 'captcha:success', (function(_this) { return function() { return $.queueTask(function() { return _this.save(false); }); }; })(this)); + return new MutationObserver(this.watchBubbles.bind(this)).observe(d.body, { + childList: true + }); }, initFrame: function() { var conn, ref, token; @@ -8699,6 +8702,39 @@ } else { return $.globalEval('(function() {\n var container = document.querySelector("#qr .captcha-container");\n window.grecaptcha.reset(container.dataset.widgetID);\n})();'); } + }, + watchBubbles: function(mutations) { + var k, len1, mutation, node, results; + results = []; + for (k = 0, len1 = mutations.length; k < len1; k++) { + mutation = mutations[k]; + results.push((function() { + var len2, q, ref, results1; + ref = mutation.addedNodes; + results1 = []; + 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, { + attributes: true + })); + } else { + results1.push(void 0); + } + } + return results1; + }).call(this)); + } + return results; + }, + fixBubble: function(node) { + var bottom, newLeft, qrLeft, ref, right, width; + ref = node.getBoundingClientRect(), bottom = ref.bottom, right = ref.right, width = ref.width; + if (bottom > 0 && right > doc.clientWidth) { + qrLeft = QR.nodes.el.getBoundingClientRect().left; + newLeft = Math.max(0, qrLeft - width); + return node.style.left = newLeft + "px"; + } } }; diff --git a/builds/4chan-X-noupdate.crx b/builds/4chan-X-noupdate.crx index b4a74bea9..65d92a6cf 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 ff40f1370..694f39675 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.14.6 +// @version 1.11.14.7 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -414,7 +414,7 @@ doc = d.documentElement; g = { - VERSION: '1.11.14.6', + VERSION: '1.11.14.7', NAMESPACE: '4chan X.', boards: {} }; @@ -8450,13 +8450,16 @@ return e.stopPropagation(); }; })(this)); - return $.on(window, 'captcha:success', (function(_this) { + $.on(window, 'captcha:success', (function(_this) { return function() { return $.queueTask(function() { return _this.save(false); }); }; })(this)); + return new MutationObserver(this.watchBubbles.bind(this)).observe(d.body, { + childList: true + }); }, initFrame: function() { var conn, ref, token; @@ -8699,6 +8702,39 @@ } else { return $.globalEval('(function() {\n var container = document.querySelector("#qr .captcha-container");\n window.grecaptcha.reset(container.dataset.widgetID);\n})();'); } + }, + watchBubbles: function(mutations) { + var k, len1, mutation, node, results; + results = []; + for (k = 0, len1 = mutations.length; k < len1; k++) { + mutation = mutations[k]; + results.push((function() { + var len2, q, ref, results1; + ref = mutation.addedNodes; + results1 = []; + 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, { + attributes: true + })); + } else { + results1.push(void 0); + } + } + return results1; + }).call(this)); + } + return results; + }, + fixBubble: function(node) { + var bottom, newLeft, qrLeft, ref, right, width; + ref = node.getBoundingClientRect(), bottom = ref.bottom, right = ref.right, width = ref.width; + if (bottom > 0 && right > doc.clientWidth) { + qrLeft = QR.nodes.el.getBoundingClientRect().left; + newLeft = Math.max(0, qrLeft - width); + return node.style.left = newLeft + "px"; + } } }; diff --git a/builds/4chan-X.crx b/builds/4chan-X.crx index f6ee22c72..778e686d3 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 07997c6af..36b970996 100644 --- a/builds/4chan-X.meta.js +++ b/builds/4chan-X.meta.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X -// @version 1.11.14.6 +// @version 1.11.14.7 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 372b5b6eb..d9b6fe1a9 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.14.6 +// @version 1.11.14.7 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -414,7 +414,7 @@ doc = d.documentElement; g = { - VERSION: '1.11.14.6', + VERSION: '1.11.14.7', NAMESPACE: '4chan X.', boards: {} }; @@ -8450,13 +8450,16 @@ return e.stopPropagation(); }; })(this)); - return $.on(window, 'captcha:success', (function(_this) { + $.on(window, 'captcha:success', (function(_this) { return function() { return $.queueTask(function() { return _this.save(false); }); }; })(this)); + return new MutationObserver(this.watchBubbles.bind(this)).observe(d.body, { + childList: true + }); }, initFrame: function() { var conn, ref, token; @@ -8699,6 +8702,39 @@ } else { return $.globalEval('(function() {\n var container = document.querySelector("#qr .captcha-container");\n window.grecaptcha.reset(container.dataset.widgetID);\n})();'); } + }, + watchBubbles: function(mutations) { + var k, len1, mutation, node, results; + results = []; + for (k = 0, len1 = mutations.length; k < len1; k++) { + mutation = mutations[k]; + results.push((function() { + var len2, q, ref, results1; + ref = mutation.addedNodes; + results1 = []; + 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, { + attributes: true + })); + } else { + results1.push(void 0); + } + } + return results1; + }).call(this)); + } + return results; + }, + fixBubble: function(node) { + var bottom, newLeft, qrLeft, ref, right, width; + ref = node.getBoundingClientRect(), bottom = ref.bottom, right = ref.right, width = ref.width; + if (bottom > 0 && right > doc.clientWidth) { + qrLeft = QR.nodes.el.getBoundingClientRect().left; + newLeft = Math.max(0, qrLeft - width); + return node.style.left = newLeft + "px"; + } } }; diff --git a/builds/4chan-X.zip b/builds/4chan-X.zip index 0ef1d8a53..9abcc4181 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 87b4d3f74..bb600c7ab 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 2d490b6d1..f3c6e7eee 100644 --- a/builds/updates.xml +++ b/builds/updates.xml @@ -1,7 +1,7 @@ - + diff --git a/package.json b/package.json index f75adc82b..af2be756f 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,8 @@ "meta": { "name": "4chan X", "fork": "ccd0", - "version": "1.11.14.6", - "date": "2015-10-30T04:11:49.050Z", + "version": "1.11.14.7", + "date": "2015-10-30T16:29:22.951Z", "page": "https://www.4chan-x.net/", "downloads": "https://www.4chan-x.net/builds/", "oldVersions": "https://raw.githubusercontent.com/ccd0/4chan-x/",