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 dc2192452..dc250ad8d 100755 --- a/src/General/Get.coffee +++ b/src/General/Get.coffee @@ -154,7 +154,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