diff --git a/CHANGELOG.md b/CHANGELOG.md
index 22d650336..449f505a3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,9 @@
### v1.13.12
+**v1.13.12.2** *(2017-10-02)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.12.2/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.12.2/builds/4chan-X-noupdate.crx)]
+- Workaround for Twitter embed height issues. #1517
+
**v1.13.12.1** *(2017-09-29)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.12.1/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.12.1/builds/4chan-X-noupdate.crx)]
- Merge v1.13.11.5: Fix lag after settings changes.
diff --git a/builds/4chan-X-beta.crx b/builds/4chan-X-beta.crx
index c8cc6364f..4fd5b9950 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 031e9987c..3f4f98f3d 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.13.12.1
+// @version 1.13.12.2
// @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 7bda6c13a..8896f4000 100644
--- a/builds/4chan-X-beta.user.js
+++ b/builds/4chan-X-beta.user.js
@@ -1,6 +1,6 @@
// ==UserScript==
// @name 4chan X beta
-// @version 1.13.12.1
+// @version 1.13.12.2
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@@ -158,7 +158,7 @@ docSet = function() {
};
g = {
- VERSION: '1.13.12.1',
+ VERSION: '1.13.12.2',
NAMESPACE: '4chan X.',
boards: {}
};
@@ -15021,9 +15021,9 @@ Embedding = (function() {
}, {
key: 'Twitter',
regExp: /^\w+:\/\/(?:www\.|mobile\.)?twitter\.com\/(\w+\/status\/\d+)/,
- style: 'border: none; width: 550px; height: 250px; max-height: 80vh;',
+ style: 'border: none; width: 550px; height: 250px; overflow: hidden; resize: both;',
el: function(a) {
- var el, onMessage;
+ var cont, el, onMessage;
el = $.el('iframe');
$.on(el, 'load', function() {
return this.contentWindow.postMessage({
@@ -15034,12 +15034,19 @@ Embedding = (function() {
onMessage = function(e) {
if (e.source === el.contentWindow && e.origin === 'https://twitframe.com') {
$.off(window, 'message', onMessage);
- return el.style.height = (+e.data.height) + "px";
+ return (cont || el).style.height = (+$.minmax(e.data.height, 250, 0.8 * doc.clientHeight)) + "px";
}
};
$.on(window, 'message', onMessage);
el.src = "https://twitframe.com/show?url=https://twitter.com/" + a.dataset.uid;
- return el;
+ if ($.engine === 'gecko') {
+ el.style.cssText = 'border: none; width: 100%; height: 100%;';
+ cont = $.el('div');
+ $.add(cont, el);
+ return cont;
+ } else {
+ return el;
+ }
}
}, {
key: 'Vimeo',
diff --git a/builds/4chan-X-noupdate.crx b/builds/4chan-X-noupdate.crx
index 371b85c6f..198c14c53 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 a757cc7a9..2767c773d 100644
--- a/builds/4chan-X-noupdate.user.js
+++ b/builds/4chan-X-noupdate.user.js
@@ -1,6 +1,6 @@
// ==UserScript==
// @name 4chan X
-// @version 1.13.12.1
+// @version 1.13.12.2
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@@ -158,7 +158,7 @@ docSet = function() {
};
g = {
- VERSION: '1.13.12.1',
+ VERSION: '1.13.12.2',
NAMESPACE: '4chan X.',
boards: {}
};
@@ -15021,9 +15021,9 @@ Embedding = (function() {
}, {
key: 'Twitter',
regExp: /^\w+:\/\/(?:www\.|mobile\.)?twitter\.com\/(\w+\/status\/\d+)/,
- style: 'border: none; width: 550px; height: 250px; max-height: 80vh;',
+ style: 'border: none; width: 550px; height: 250px; overflow: hidden; resize: both;',
el: function(a) {
- var el, onMessage;
+ var cont, el, onMessage;
el = $.el('iframe');
$.on(el, 'load', function() {
return this.contentWindow.postMessage({
@@ -15034,12 +15034,19 @@ Embedding = (function() {
onMessage = function(e) {
if (e.source === el.contentWindow && e.origin === 'https://twitframe.com') {
$.off(window, 'message', onMessage);
- return el.style.height = (+e.data.height) + "px";
+ return (cont || el).style.height = (+$.minmax(e.data.height, 250, 0.8 * doc.clientHeight)) + "px";
}
};
$.on(window, 'message', onMessage);
el.src = "https://twitframe.com/show?url=https://twitter.com/" + a.dataset.uid;
- return el;
+ if ($.engine === 'gecko') {
+ el.style.cssText = 'border: none; width: 100%; height: 100%;';
+ cont = $.el('div');
+ $.add(cont, el);
+ return cont;
+ } else {
+ return el;
+ }
}
}, {
key: 'Vimeo',
diff --git a/builds/4chan-X.crx b/builds/4chan-X.crx
index 541055496..1e2f2fd6f 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 f88c59775..02e41f471 100644
--- a/builds/4chan-X.meta.js
+++ b/builds/4chan-X.meta.js
@@ -1,6 +1,6 @@
// ==UserScript==
// @name 4chan X
-// @version 1.13.12.1
+// @version 1.13.12.2
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js
index 28e3a4b01..52a1027d2 100644
--- a/builds/4chan-X.user.js
+++ b/builds/4chan-X.user.js
@@ -1,6 +1,6 @@
// ==UserScript==
// @name 4chan X
-// @version 1.13.12.1
+// @version 1.13.12.2
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@@ -158,7 +158,7 @@ docSet = function() {
};
g = {
- VERSION: '1.13.12.1',
+ VERSION: '1.13.12.2',
NAMESPACE: '4chan X.',
boards: {}
};
@@ -15021,9 +15021,9 @@ Embedding = (function() {
}, {
key: 'Twitter',
regExp: /^\w+:\/\/(?:www\.|mobile\.)?twitter\.com\/(\w+\/status\/\d+)/,
- style: 'border: none; width: 550px; height: 250px; max-height: 80vh;',
+ style: 'border: none; width: 550px; height: 250px; overflow: hidden; resize: both;',
el: function(a) {
- var el, onMessage;
+ var cont, el, onMessage;
el = $.el('iframe');
$.on(el, 'load', function() {
return this.contentWindow.postMessage({
@@ -15034,12 +15034,19 @@ Embedding = (function() {
onMessage = function(e) {
if (e.source === el.contentWindow && e.origin === 'https://twitframe.com') {
$.off(window, 'message', onMessage);
- return el.style.height = (+e.data.height) + "px";
+ return (cont || el).style.height = (+$.minmax(e.data.height, 250, 0.8 * doc.clientHeight)) + "px";
}
};
$.on(window, 'message', onMessage);
el.src = "https://twitframe.com/show?url=https://twitter.com/" + a.dataset.uid;
- return el;
+ if ($.engine === 'gecko') {
+ el.style.cssText = 'border: none; width: 100%; height: 100%;';
+ cont = $.el('div');
+ $.add(cont, el);
+ return cont;
+ } else {
+ return el;
+ }
}
}, {
key: 'Vimeo',
diff --git a/builds/4chan-X.zip b/builds/4chan-X.zip
index 3442d2f45..b8a5fd92b 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 2e6ed40c2..4e1175a20 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 307246286..612993d9a 100644
--- a/builds/updates.xml
+++ b/builds/updates.xml
@@ -1,7 +1,7 @@
-
+
diff --git a/version.json b/version.json
index ef9ee9f42..f80f31c8b 100644
--- a/version.json
+++ b/version.json
@@ -1,4 +1,4 @@
{
- "version": "1.13.12.1",
- "date": "2017-09-29T00:42:32.947Z"
+ "version": "1.13.12.2",
+ "date": "2017-10-02T09:25:12.009Z"
}
\ No newline at end of file