diff --git a/CHANGELOG.md b/CHANGELOG.md
index af5a67b34..f322e1718 100755
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,6 @@
+### v1.8.9.4
+*2014-08-11*
+
**ccd0**
- Fix issue where `Except Archives from Encryption` option could reveal the page you are on to a MITM attacker.
diff --git a/LICENSE b/LICENSE
index 106cc0744..c63e880e2 100755
--- a/LICENSE
+++ b/LICENSE
@@ -1,5 +1,5 @@
/*
-* 4chan X - Version 1.8.9.3
+* 4chan X - Version 1.8.9.4
*
* Licensed under the MIT license.
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
diff --git a/builds/4chan-X-beta.crx b/builds/4chan-X-beta.crx
index 2bdb1db9c..5b6aee159 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 e49de9239..ccbe88b86 100644
--- a/builds/4chan-X-beta.meta.js
+++ b/builds/4chan-X-beta.meta.js
@@ -1,6 +1,6 @@
// ==UserScript==
// @name 4chan X
-// @version 1.8.9.3
+// @version 1.8.9.4
// @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 99a3c8d96..1e7eda8d5 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
-// @version 1.8.9.3
+// @version 1.8.9.4
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@@ -24,7 +24,7 @@
// ==/UserScript==
/*
-* 4chan X - Version 1.8.9.3
+* 4chan X - Version 1.8.9.4
*
* Licensed under the MIT license.
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
@@ -380,7 +380,7 @@
doc = d.documentElement;
g = {
- VERSION: '1.8.9.3',
+ VERSION: '1.8.9.4',
NAMESPACE: '4chan X.',
NAME: '4chan X',
FAQ: 'https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions',
@@ -3522,6 +3522,17 @@
return true;
} else if (Conf['Except Archives from Encryption']) {
CrossOrigin.json(url, function(response) {
+ var key, media;
+ media = response.media;
+ if (media) {
+ for (key in media) {
+ if (/_link$/.test(key)) {
+ if (!/^http:\/\//.test(media[key])) {
+ delete media[key];
+ }
+ }
+ }
+ }
return Get.parseArchivedPost(response, boardID, postID, root, context);
});
return true;
@@ -3618,7 +3629,7 @@
o.file = {
name: data.media.media_filename,
timestamp: data.media.media_orig,
- url: data.media.media_link || data.media.remote_media_link,
+ url: data.media.media_link || data.media.remote_media_link || ("//i.4cdn.org/" + boardID + "/" + (encodeURIComponent(data.media[boardID === 'f' ? 'media_filename' : 'media_orig']))),
height: data.media.media_h,
width: data.media.media_w,
MD5: data.media.media_hash,
@@ -12731,7 +12742,7 @@
className: 'dialog'
});
$.extend(dialog, {
- innerHTML: "
"
+ innerHTML: ""
});
$.on($('.export', Settings.dialog), 'click', Settings["export"]);
$.on($('.import', Settings.dialog), 'click', Settings["import"]);
@@ -13145,7 +13156,8 @@
_ref4 = ['thread', 'post', 'file'];
for (_m = 0, _len4 = _ref4.length; _m < _len4; _m++) {
item = _ref4[_m];
- o[item][0].push('disabled');
+ i = o[item][0].length ? 1 : 0;
+ o[item][i].push('disabled');
o[item] = o[item][0].concat(o[item][1]);
}
}
diff --git a/builds/4chan-X-noupdate.crx b/builds/4chan-X-noupdate.crx
index bdab2aeea..5573602a4 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 bdf4d138c..c5a5c6fce 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.8.9.3
+// @version 1.8.9.4
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@@ -23,7 +23,7 @@
// ==/UserScript==
/*
-* 4chan X - Version 1.8.9.3
+* 4chan X - Version 1.8.9.4
*
* Licensed under the MIT license.
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
@@ -379,7 +379,7 @@
doc = d.documentElement;
g = {
- VERSION: '1.8.9.3',
+ VERSION: '1.8.9.4',
NAMESPACE: '4chan X.',
NAME: '4chan X',
FAQ: 'https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions',
@@ -3521,6 +3521,17 @@
return true;
} else if (Conf['Except Archives from Encryption']) {
CrossOrigin.json(url, function(response) {
+ var key, media;
+ media = response.media;
+ if (media) {
+ for (key in media) {
+ if (/_link$/.test(key)) {
+ if (!/^http:\/\//.test(media[key])) {
+ delete media[key];
+ }
+ }
+ }
+ }
return Get.parseArchivedPost(response, boardID, postID, root, context);
});
return true;
@@ -3617,7 +3628,7 @@
o.file = {
name: data.media.media_filename,
timestamp: data.media.media_orig,
- url: data.media.media_link || data.media.remote_media_link,
+ url: data.media.media_link || data.media.remote_media_link || ("//i.4cdn.org/" + boardID + "/" + (encodeURIComponent(data.media[boardID === 'f' ? 'media_filename' : 'media_orig']))),
height: data.media.media_h,
width: data.media.media_w,
MD5: data.media.media_hash,
@@ -12730,7 +12741,7 @@
className: 'dialog'
});
$.extend(dialog, {
- innerHTML: ""
+ innerHTML: ""
});
$.on($('.export', Settings.dialog), 'click', Settings["export"]);
$.on($('.import', Settings.dialog), 'click', Settings["import"]);
@@ -13144,7 +13155,8 @@
_ref4 = ['thread', 'post', 'file'];
for (_m = 0, _len4 = _ref4.length; _m < _len4; _m++) {
item = _ref4[_m];
- o[item][0].push('disabled');
+ i = o[item][0].length ? 1 : 0;
+ o[item][i].push('disabled');
o[item] = o[item][0].concat(o[item][1]);
}
}
diff --git a/builds/4chan-X.crx b/builds/4chan-X.crx
index 71fd95662..f2f3a29d9 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 1d0ca4ad1..b2f27b55e 100644
--- a/builds/4chan-X.meta.js
+++ b/builds/4chan-X.meta.js
@@ -1,6 +1,6 @@
// ==UserScript==
// @name 4chan X
-// @version 1.8.9.3
+// @version 1.8.9.4
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js
index 6a081b837..de625925b 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.8.9.3
+// @version 1.8.9.4
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@@ -24,7 +24,7 @@
// ==/UserScript==
/*
-* 4chan X - Version 1.8.9.3
+* 4chan X - Version 1.8.9.4
*
* Licensed under the MIT license.
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
@@ -380,7 +380,7 @@
doc = d.documentElement;
g = {
- VERSION: '1.8.9.3',
+ VERSION: '1.8.9.4',
NAMESPACE: '4chan X.',
NAME: '4chan X',
FAQ: 'https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions',
@@ -3522,6 +3522,17 @@
return true;
} else if (Conf['Except Archives from Encryption']) {
CrossOrigin.json(url, function(response) {
+ var key, media;
+ media = response.media;
+ if (media) {
+ for (key in media) {
+ if (/_link$/.test(key)) {
+ if (!/^http:\/\//.test(media[key])) {
+ delete media[key];
+ }
+ }
+ }
+ }
return Get.parseArchivedPost(response, boardID, postID, root, context);
});
return true;
@@ -3618,7 +3629,7 @@
o.file = {
name: data.media.media_filename,
timestamp: data.media.media_orig,
- url: data.media.media_link || data.media.remote_media_link,
+ url: data.media.media_link || data.media.remote_media_link || ("//i.4cdn.org/" + boardID + "/" + (encodeURIComponent(data.media[boardID === 'f' ? 'media_filename' : 'media_orig']))),
height: data.media.media_h,
width: data.media.media_w,
MD5: data.media.media_hash,
@@ -12731,7 +12742,7 @@
className: 'dialog'
});
$.extend(dialog, {
- innerHTML: ""
+ innerHTML: ""
});
$.on($('.export', Settings.dialog), 'click', Settings["export"]);
$.on($('.import', Settings.dialog), 'click', Settings["import"]);
@@ -13145,7 +13156,8 @@
_ref4 = ['thread', 'post', 'file'];
for (_m = 0, _len4 = _ref4.length; _m < _len4; _m++) {
item = _ref4[_m];
- o[item][0].push('disabled');
+ i = o[item][0].length ? 1 : 0;
+ o[item][i].push('disabled');
o[item] = o[item][0].concat(o[item][1]);
}
}
diff --git a/builds/4chan-X.zip b/builds/4chan-X.zip
index d3ae24996..ecc86575e 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 e42dad229..91766bf13 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 fbb445e89..42af95b14 100644
--- a/builds/updates.xml
+++ b/builds/updates.xml
@@ -1,7 +1,7 @@
-
+
diff --git a/package.json b/package.json
index 96534d49b..e80a3cc3d 100755
--- a/package.json
+++ b/package.json
@@ -3,7 +3,7 @@
"description": "Cross-browser userscript for maximum lurking on 4chan.",
"meta": {
"name": "4chan X",
- "version": "1.8.9.3",
+ "version": "1.8.9.4",
"repo": "https://github.com/ccd0/4chan-x/",
"page": "https://github.com/ccd0/4chan-x",
"downloads": "https://ccd0.github.io/4chan-x/builds/",