diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1105dbe31..404779182 100755
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,6 @@
+### v1.8.6
+*2014-07-13*
+
**ccd0**
- Warn when redirecting from an HTTPS 404 page to an HTTP archive, and don't load unencrypted posts/images from archives when using HTTPS.
- `Loop in New Tab` now only makes the video loop, and doesn't apply any of your other settings.
diff --git a/LICENSE b/LICENSE
index c9ce0e24e..6eb118876 100755
--- a/LICENSE
+++ b/LICENSE
@@ -1,5 +1,5 @@
/*
-* 4chan X - Version 1.8.5.3 - 2014-07-13
+* 4chan X - Version 1.8.6 - 2014-07-13
*
* 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 d44478f8a..d01a446d2 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 7fc466e30..ba7cbac23 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.5.3
+// @version 1.8.6
// @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 04feb99d0..b2c08d10c 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.5.3
+// @version 1.8.6
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@@ -24,7 +24,7 @@
// ==/UserScript==
/*
-* 4chan X - Version 1.8.5.3 - 2014-07-13
+* 4chan X - Version 1.8.6 - 2014-07-13
*
* Licensed under the MIT license.
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
@@ -187,7 +187,7 @@
'Werk Tyme': [false, 'Hide all post images.'],
'Autoplay': [true, 'Videos begin playing immediately when opened.'],
'Show Controls': [true, 'Show controls on videos expanded inline. Turn this off if you want to contract videos by clicking on them.'],
- 'Loop in New Tab': [true, 'Loop videos opened in their own tabs, and apply settings for inline expanded videos to them.']
+ 'Loop in New Tab': [true, 'Loop videos opened in their own tabs.']
},
'Menu': {
'Menu': [true, 'Add a drop-down menu to posts.'],
@@ -376,7 +376,7 @@
doc = d.documentElement;
g = {
- VERSION: '1.8.5.3',
+ VERSION: '1.8.6',
NAMESPACE: '4chan X.',
boards: {}
};
@@ -7782,6 +7782,8 @@
});
if (URL) {
thumb.href = URL;
+ }
+ if (URL && (/^https:\/\//.test(URL) || location.protocol === 'http:')) {
if (Gallery.nodes.current !== file) {
return;
}
@@ -8242,7 +8244,7 @@
boardID: src[3],
filename: src[src.length - 1]
});
- if (URL) {
+ if (URL && (/^https:\/\//.test(URL) || location.protocol === 'http:')) {
setTimeout(ImageExpand.expand, 10000, post, URL);
return;
}
@@ -8400,7 +8402,7 @@
boardID: src[3],
filename: src[src.length - 1].replace(/\?.+$/, '')
});
- if (URL) {
+ if (URL && (/^https:\/\//.test(URL) || location.protocol === 'http:')) {
this.src = URL;
return;
}
@@ -10903,9 +10905,13 @@
return "" + (Redirect.protocol(archive)) + archive.domain + "/" + path;
},
post: function(archive, _arg) {
- var URL, boardID, postID;
+ var URL, boardID, postID, protocol;
boardID = _arg.boardID, postID = _arg.postID;
- URL = new String("" + (Redirect.protocol(archive)) + archive.domain + "/_/api/chan/post/?board=" + boardID + "&num=" + postID);
+ protocol = Redirect.protocol(archive);
+ if (!(protocol === 'https://' || location.protocol === 'http:')) {
+ return '';
+ }
+ URL = new String("" + protocol + archive.domain + "/_/api/chan/post/?board=" + boardID + "&num=" + postID);
URL.archive = archive;
return URL;
},
@@ -10921,6 +10927,13 @@
value = encodeURIComponent(value);
path = archive.software === 'foolfuuka' ? "" + boardID + "/search/" + type + "/" + value : "" + boardID + "/?task=search2&search_" + (type === 'image' ? 'media_hash' : type) + "=" + value;
return "" + (Redirect.protocol(archive)) + archive.domain + "/" + path;
+ },
+ navigate: function(URL, alternative) {
+ if (/^https:\/\//.test(URL) || location.protocol === 'http:' || confirm("Redirect to " + URL + "?\n\nYour connection will not be encrypted.")) {
+ return location.replace(URL);
+ } else if (alternative) {
+ return location.replace(alternative);
+ }
}
};
@@ -12506,7 +12519,7 @@
Settings.dialog = dialog = $.el('div', {
id: 'fourchanx-settings',
className: 'dialog',
- innerHTML: '
'
+ innerHTML: ''
});
$.on($('.export', Settings.dialog), 'click', Settings["export"]);
$.on($('.import', Settings.dialog), 'click', Settings["import"]);
@@ -13181,20 +13194,9 @@
boardID: g.BOARD.ID,
filename: pathname[pathname.length - 1]
});
- if (URL) {
- return location.replace(URL);
- }
+ return Redirect.navigate(URL);
} else if (Conf['Loop in New Tab'] && (video = $('video'))) {
- Video.configure(video);
- return $.on(video, 'click', function() {
- if (!video.controls) {
- if (video.paused) {
- return video.play();
- } else {
- return video.pause();
- }
- }
- });
+ return video.loop = true;
}
});
return;
@@ -13273,7 +13275,7 @@
threadID: g.THREADID,
postID: +location.hash.match(/\d+/)
});
- location.replace(href || ("/" + g.BOARD + "/"));
+ Redirect.navigate(href, "/" + g.BOARD + "/");
}
return;
}
@@ -13358,7 +13360,7 @@
}
if (previousversion) {
el = $.el('span', {
- innerHTML: '4chan X has been updated to version 1.8.5.3.'
+ innerHTML: '4chan X has been updated to version 1.8.6.'
});
new Notice('info', el, 15);
} else {
diff --git a/builds/4chan-X-noupdate.crx b/builds/4chan-X-noupdate.crx
index ff34723b6..e33399a25 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 6ee8daa15..ba72831ed 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.5.3
+// @version 1.8.6
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@@ -23,7 +23,7 @@
// ==/UserScript==
/*
-* 4chan X - Version 1.8.5.3 - 2014-07-13
+* 4chan X - Version 1.8.6 - 2014-07-13
*
* Licensed under the MIT license.
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
@@ -186,7 +186,7 @@
'Werk Tyme': [false, 'Hide all post images.'],
'Autoplay': [true, 'Videos begin playing immediately when opened.'],
'Show Controls': [true, 'Show controls on videos expanded inline. Turn this off if you want to contract videos by clicking on them.'],
- 'Loop in New Tab': [true, 'Loop videos opened in their own tabs, and apply settings for inline expanded videos to them.']
+ 'Loop in New Tab': [true, 'Loop videos opened in their own tabs.']
},
'Menu': {
'Menu': [true, 'Add a drop-down menu to posts.'],
@@ -375,7 +375,7 @@
doc = d.documentElement;
g = {
- VERSION: '1.8.5.3',
+ VERSION: '1.8.6',
NAMESPACE: '4chan X.',
boards: {}
};
@@ -7781,6 +7781,8 @@
});
if (URL) {
thumb.href = URL;
+ }
+ if (URL && (/^https:\/\//.test(URL) || location.protocol === 'http:')) {
if (Gallery.nodes.current !== file) {
return;
}
@@ -8241,7 +8243,7 @@
boardID: src[3],
filename: src[src.length - 1]
});
- if (URL) {
+ if (URL && (/^https:\/\//.test(URL) || location.protocol === 'http:')) {
setTimeout(ImageExpand.expand, 10000, post, URL);
return;
}
@@ -8399,7 +8401,7 @@
boardID: src[3],
filename: src[src.length - 1].replace(/\?.+$/, '')
});
- if (URL) {
+ if (URL && (/^https:\/\//.test(URL) || location.protocol === 'http:')) {
this.src = URL;
return;
}
@@ -10902,9 +10904,13 @@
return "" + (Redirect.protocol(archive)) + archive.domain + "/" + path;
},
post: function(archive, _arg) {
- var URL, boardID, postID;
+ var URL, boardID, postID, protocol;
boardID = _arg.boardID, postID = _arg.postID;
- URL = new String("" + (Redirect.protocol(archive)) + archive.domain + "/_/api/chan/post/?board=" + boardID + "&num=" + postID);
+ protocol = Redirect.protocol(archive);
+ if (!(protocol === 'https://' || location.protocol === 'http:')) {
+ return '';
+ }
+ URL = new String("" + protocol + archive.domain + "/_/api/chan/post/?board=" + boardID + "&num=" + postID);
URL.archive = archive;
return URL;
},
@@ -10920,6 +10926,13 @@
value = encodeURIComponent(value);
path = archive.software === 'foolfuuka' ? "" + boardID + "/search/" + type + "/" + value : "" + boardID + "/?task=search2&search_" + (type === 'image' ? 'media_hash' : type) + "=" + value;
return "" + (Redirect.protocol(archive)) + archive.domain + "/" + path;
+ },
+ navigate: function(URL, alternative) {
+ if (/^https:\/\//.test(URL) || location.protocol === 'http:' || confirm("Redirect to " + URL + "?\n\nYour connection will not be encrypted.")) {
+ return location.replace(URL);
+ } else if (alternative) {
+ return location.replace(alternative);
+ }
}
};
@@ -12505,7 +12518,7 @@
Settings.dialog = dialog = $.el('div', {
id: 'fourchanx-settings',
className: 'dialog',
- innerHTML: ''
+ innerHTML: ''
});
$.on($('.export', Settings.dialog), 'click', Settings["export"]);
$.on($('.import', Settings.dialog), 'click', Settings["import"]);
@@ -13180,20 +13193,9 @@
boardID: g.BOARD.ID,
filename: pathname[pathname.length - 1]
});
- if (URL) {
- return location.replace(URL);
- }
+ return Redirect.navigate(URL);
} else if (Conf['Loop in New Tab'] && (video = $('video'))) {
- Video.configure(video);
- return $.on(video, 'click', function() {
- if (!video.controls) {
- if (video.paused) {
- return video.play();
- } else {
- return video.pause();
- }
- }
- });
+ return video.loop = true;
}
});
return;
@@ -13272,7 +13274,7 @@
threadID: g.THREADID,
postID: +location.hash.match(/\d+/)
});
- location.replace(href || ("/" + g.BOARD + "/"));
+ Redirect.navigate(href, "/" + g.BOARD + "/");
}
return;
}
@@ -13357,7 +13359,7 @@
}
if (previousversion) {
el = $.el('span', {
- innerHTML: '4chan X has been updated to version 1.8.5.3.'
+ innerHTML: '4chan X has been updated to version 1.8.6.'
});
new Notice('info', el, 15);
} else {
diff --git a/builds/4chan-X.crx b/builds/4chan-X.crx
index 30a0f07c5..f3b1e50ff 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 10d594249..455cfb230 100644
--- a/builds/4chan-X.meta.js
+++ b/builds/4chan-X.meta.js
@@ -1,6 +1,6 @@
// ==UserScript==
// @name 4chan X
-// @version 1.8.5.3
+// @version 1.8.6
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js
index 6d637c4ba..554eca269 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.5.3
+// @version 1.8.6
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@@ -24,7 +24,7 @@
// ==/UserScript==
/*
-* 4chan X - Version 1.8.5.3 - 2014-07-13
+* 4chan X - Version 1.8.6 - 2014-07-13
*
* Licensed under the MIT license.
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
@@ -187,7 +187,7 @@
'Werk Tyme': [false, 'Hide all post images.'],
'Autoplay': [true, 'Videos begin playing immediately when opened.'],
'Show Controls': [true, 'Show controls on videos expanded inline. Turn this off if you want to contract videos by clicking on them.'],
- 'Loop in New Tab': [true, 'Loop videos opened in their own tabs, and apply settings for inline expanded videos to them.']
+ 'Loop in New Tab': [true, 'Loop videos opened in their own tabs.']
},
'Menu': {
'Menu': [true, 'Add a drop-down menu to posts.'],
@@ -376,7 +376,7 @@
doc = d.documentElement;
g = {
- VERSION: '1.8.5.3',
+ VERSION: '1.8.6',
NAMESPACE: '4chan X.',
boards: {}
};
@@ -7782,6 +7782,8 @@
});
if (URL) {
thumb.href = URL;
+ }
+ if (URL && (/^https:\/\//.test(URL) || location.protocol === 'http:')) {
if (Gallery.nodes.current !== file) {
return;
}
@@ -8242,7 +8244,7 @@
boardID: src[3],
filename: src[src.length - 1]
});
- if (URL) {
+ if (URL && (/^https:\/\//.test(URL) || location.protocol === 'http:')) {
setTimeout(ImageExpand.expand, 10000, post, URL);
return;
}
@@ -8400,7 +8402,7 @@
boardID: src[3],
filename: src[src.length - 1].replace(/\?.+$/, '')
});
- if (URL) {
+ if (URL && (/^https:\/\//.test(URL) || location.protocol === 'http:')) {
this.src = URL;
return;
}
@@ -10903,9 +10905,13 @@
return "" + (Redirect.protocol(archive)) + archive.domain + "/" + path;
},
post: function(archive, _arg) {
- var URL, boardID, postID;
+ var URL, boardID, postID, protocol;
boardID = _arg.boardID, postID = _arg.postID;
- URL = new String("" + (Redirect.protocol(archive)) + archive.domain + "/_/api/chan/post/?board=" + boardID + "&num=" + postID);
+ protocol = Redirect.protocol(archive);
+ if (!(protocol === 'https://' || location.protocol === 'http:')) {
+ return '';
+ }
+ URL = new String("" + protocol + archive.domain + "/_/api/chan/post/?board=" + boardID + "&num=" + postID);
URL.archive = archive;
return URL;
},
@@ -10921,6 +10927,13 @@
value = encodeURIComponent(value);
path = archive.software === 'foolfuuka' ? "" + boardID + "/search/" + type + "/" + value : "" + boardID + "/?task=search2&search_" + (type === 'image' ? 'media_hash' : type) + "=" + value;
return "" + (Redirect.protocol(archive)) + archive.domain + "/" + path;
+ },
+ navigate: function(URL, alternative) {
+ if (/^https:\/\//.test(URL) || location.protocol === 'http:' || confirm("Redirect to " + URL + "?\n\nYour connection will not be encrypted.")) {
+ return location.replace(URL);
+ } else if (alternative) {
+ return location.replace(alternative);
+ }
}
};
@@ -12506,7 +12519,7 @@
Settings.dialog = dialog = $.el('div', {
id: 'fourchanx-settings',
className: 'dialog',
- innerHTML: ''
+ innerHTML: ''
});
$.on($('.export', Settings.dialog), 'click', Settings["export"]);
$.on($('.import', Settings.dialog), 'click', Settings["import"]);
@@ -13181,20 +13194,9 @@
boardID: g.BOARD.ID,
filename: pathname[pathname.length - 1]
});
- if (URL) {
- return location.replace(URL);
- }
+ return Redirect.navigate(URL);
} else if (Conf['Loop in New Tab'] && (video = $('video'))) {
- Video.configure(video);
- return $.on(video, 'click', function() {
- if (!video.controls) {
- if (video.paused) {
- return video.play();
- } else {
- return video.pause();
- }
- }
- });
+ return video.loop = true;
}
});
return;
@@ -13273,7 +13275,7 @@
threadID: g.THREADID,
postID: +location.hash.match(/\d+/)
});
- location.replace(href || ("/" + g.BOARD + "/"));
+ Redirect.navigate(href, "/" + g.BOARD + "/");
}
return;
}
@@ -13358,7 +13360,7 @@
}
if (previousversion) {
el = $.el('span', {
- innerHTML: '4chan X has been updated to version 1.8.5.3.'
+ innerHTML: '4chan X has been updated to version 1.8.6.'
});
new Notice('info', el, 15);
} else {
diff --git a/builds/4chan-X.zip b/builds/4chan-X.zip
index 1ec9ae85e..d3026d579 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 b694a0095..d0eaa3e46 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 07d8ee7e9..1bda88c11 100644
--- a/builds/updates.xml
+++ b/builds/updates.xml
@@ -1,7 +1,7 @@
-
+
diff --git a/package.json b/package.json
index c861f7ff4..917ecc137 100755
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "4chan-X",
- "version": "1.8.5.3",
+ "version": "1.8.6",
"description": "Cross-browser userscript for maximum lurking on 4chan.",
"meta": {
"name": "4chan X",