diff --git a/CHANGELOG.md b/CHANGELOG.md
index b82727558..04c864d3c 100755
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,9 @@ The links to individual versions below are to copies of the script with the upda
### v1.10.11
+**v1.10.11.5** *(2015-04-26)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.10.11.5/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.10.11.5/builds/4chan-X-noupdate.crx "Chromium version")]
+- Reduce unwanted scrolling from captcha.
+
**v1.10.11.4** *(2015-04-26)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.10.11.4/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.10.11.4/builds/4chan-X-noupdate.crx "Chromium version")]
- Don't apply filters to the unread post count in the thread watcher, but do apply them to unread posts quoting you.
diff --git a/builds/4chan-X-beta.crx b/builds/4chan-X-beta.crx
index 8405170a1..e53fc53fb 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 1ba075942..6154503b4 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.10.11.4
+// @version 1.10.11.5
// @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 3d6be2aa4..ed9ca7bdf 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.10.11.4
+// @version 1.10.11.5
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@@ -396,7 +396,7 @@
doc = d.documentElement;
g = {
- VERSION: '1.10.11.4',
+ VERSION: '1.10.11.5',
NAMESPACE: '4chan X.',
boards: {}
};
@@ -6858,26 +6858,30 @@
return QR.captcha.destroy();
},
focus: function() {
- $.queueTask(function() {
- var focus;
- if (!$$('.goog-bubble-content > iframe').some(function(el) {
- return el.getBoundingClientRect().top >= 0;
- })) {
- focus = d.activeElement && QR.nodes.el.contains(d.activeElement);
- return $[focus ? 'addClass' : 'rmClass'](QR.nodes.el, 'focus');
+ return $.queueTask(function() {
+ if (!QR.inBubble()) {
+ QR.hasFocus = d.activeElement && QR.nodes.el.contains(d.activeElement);
+ QR.nodes.el.classList.toggle('focus', QR.hasFocus);
}
- });
- if (typeof chrome !== "undefined" && chrome !== null) {
- if (d.activeElement && QR.nodes.el.contains(d.activeElement) && d.activeElement.nodeName === 'IFRAME') {
+ if (QR.inCaptcha()) {
QR.scrollY = window.scrollY;
return $.on(d, 'scroll', QR.scrollLock);
} else {
return $.off(d, 'scroll', QR.scrollLock);
}
- }
+ });
+ },
+ inBubble: function() {
+ return $$('.goog-bubble-content > iframe').some(function(el) {
+ return 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 (d.activeElement && QR.nodes.el.contains(d.activeElement) && d.activeElement.nodeName === 'IFRAME') {
+ if (QR.inCaptcha()) {
return window.scroll(window.scrollX, QR.scrollY);
} else {
return $.off(d, 'scroll', QR.scrollLock);
diff --git a/builds/4chan-X-noupdate.crx b/builds/4chan-X-noupdate.crx
index 462f0ac02..b0c0ea121 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 fc4f3d00d..10676d2ff 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.10.11.4
+// @version 1.10.11.5
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@@ -395,7 +395,7 @@
doc = d.documentElement;
g = {
- VERSION: '1.10.11.4',
+ VERSION: '1.10.11.5',
NAMESPACE: '4chan X.',
boards: {}
};
@@ -6857,26 +6857,30 @@
return QR.captcha.destroy();
},
focus: function() {
- $.queueTask(function() {
- var focus;
- if (!$$('.goog-bubble-content > iframe').some(function(el) {
- return el.getBoundingClientRect().top >= 0;
- })) {
- focus = d.activeElement && QR.nodes.el.contains(d.activeElement);
- return $[focus ? 'addClass' : 'rmClass'](QR.nodes.el, 'focus');
+ return $.queueTask(function() {
+ if (!QR.inBubble()) {
+ QR.hasFocus = d.activeElement && QR.nodes.el.contains(d.activeElement);
+ QR.nodes.el.classList.toggle('focus', QR.hasFocus);
}
- });
- if (typeof chrome !== "undefined" && chrome !== null) {
- if (d.activeElement && QR.nodes.el.contains(d.activeElement) && d.activeElement.nodeName === 'IFRAME') {
+ if (QR.inCaptcha()) {
QR.scrollY = window.scrollY;
return $.on(d, 'scroll', QR.scrollLock);
} else {
return $.off(d, 'scroll', QR.scrollLock);
}
- }
+ });
+ },
+ inBubble: function() {
+ return $$('.goog-bubble-content > iframe').some(function(el) {
+ return 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 (d.activeElement && QR.nodes.el.contains(d.activeElement) && d.activeElement.nodeName === 'IFRAME') {
+ if (QR.inCaptcha()) {
return window.scroll(window.scrollX, QR.scrollY);
} else {
return $.off(d, 'scroll', QR.scrollLock);
diff --git a/builds/4chan-X.crx b/builds/4chan-X.crx
index 2390f2013..64ebede0c 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 7c8f54eeb..b9184cd3d 100644
--- a/builds/4chan-X.meta.js
+++ b/builds/4chan-X.meta.js
@@ -1,6 +1,6 @@
// ==UserScript==
// @name 4chan X
-// @version 1.10.11.4
+// @version 1.10.11.5
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js
index 5d2ad6587..06163337b 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.10.11.4
+// @version 1.10.11.5
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@@ -396,7 +396,7 @@
doc = d.documentElement;
g = {
- VERSION: '1.10.11.4',
+ VERSION: '1.10.11.5',
NAMESPACE: '4chan X.',
boards: {}
};
@@ -6858,26 +6858,30 @@
return QR.captcha.destroy();
},
focus: function() {
- $.queueTask(function() {
- var focus;
- if (!$$('.goog-bubble-content > iframe').some(function(el) {
- return el.getBoundingClientRect().top >= 0;
- })) {
- focus = d.activeElement && QR.nodes.el.contains(d.activeElement);
- return $[focus ? 'addClass' : 'rmClass'](QR.nodes.el, 'focus');
+ return $.queueTask(function() {
+ if (!QR.inBubble()) {
+ QR.hasFocus = d.activeElement && QR.nodes.el.contains(d.activeElement);
+ QR.nodes.el.classList.toggle('focus', QR.hasFocus);
}
- });
- if (typeof chrome !== "undefined" && chrome !== null) {
- if (d.activeElement && QR.nodes.el.contains(d.activeElement) && d.activeElement.nodeName === 'IFRAME') {
+ if (QR.inCaptcha()) {
QR.scrollY = window.scrollY;
return $.on(d, 'scroll', QR.scrollLock);
} else {
return $.off(d, 'scroll', QR.scrollLock);
}
- }
+ });
+ },
+ inBubble: function() {
+ return $$('.goog-bubble-content > iframe').some(function(el) {
+ return 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 (d.activeElement && QR.nodes.el.contains(d.activeElement) && d.activeElement.nodeName === 'IFRAME') {
+ if (QR.inCaptcha()) {
return window.scroll(window.scrollX, QR.scrollY);
} else {
return $.off(d, 'scroll', QR.scrollLock);
diff --git a/builds/4chan-X.zip b/builds/4chan-X.zip
index ef64148f0..957558295 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 0a938e2f0..917465bc2 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 aea0e1f5c..867caa650 100644
--- a/builds/updates.xml
+++ b/builds/updates.xml
@@ -1,7 +1,7 @@
-
+
diff --git a/package.json b/package.json
index 7bd98c327..4cedf66da 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.10.11.4",
- "date": "2015-04-26T18:27:45.404Z",
+ "version": "1.10.11.5",
+ "date": "2015-04-27T01:01:04.114Z",
"repo": "https://github.com/ccd0/4chan-x/",
"page": "https://github.com/ccd0/4chan-x",
"downloads": "https://ccd0.github.io/4chan-x/builds/",