diff --git a/CHANGELOG.md b/CHANGELOG.md index ffd334c9e..da9be28b0 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,12 @@ The links to individual versions below are to copies of the script with the upda - Minor bugfixes / performance improvements. +### v1.9.11.14 +*2014-11-17* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.11.14/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.11.14/builds/4chan-X-noupdate.crx "Chromium version")] + +**ccd0** +- Fix bugs in loading from HTTP-only archives on HTTPS pages. + ### v1.9.11.13 *2014-11-16* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.11.13/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.11.13/builds/4chan-X-noupdate.crx "Chromium version")] diff --git a/src/General/CrossOrigin.coffee b/src/General/CrossOrigin.coffee index 6042eb047..748339bda 100644 --- a/src/General/CrossOrigin.coffee +++ b/src/General/CrossOrigin.coffee @@ -77,7 +77,7 @@ CrossOrigin = do -> <% if (type === 'userscript') { %> GM_xmlhttpRequest method: "GET" - url: url + url: url+'' onload: (xhr) -> response = JSON.parse xhr.responseText cb response for cb in callbacks[url] diff --git a/src/General/Get.coffee b/src/General/Get.coffee index 849b55153..ddc35465a 100755 --- a/src/General/Get.coffee +++ b/src/General/Get.coffee @@ -153,7 +153,7 @@ Get = if media then for key of media when /_link$/.test key # Image/thumbnail URLs loaded over HTTP can be modified in transit. # Require them to be from a known HTTP host so that no referrer is sent to them from an HTTPS page. - delete media[key] unless media[key].match(/^(http:\/\/[^\/]+\/)?/)[0] in url.archive.imagehosts + delete media[key] unless media[key]? and media[key].match(/^(http:\/\/[^\/]+\/)?/)[0] in url.archive.imagehosts Get.parseArchivedPost response, boardID, postID, root, context return true return false