From 95ba0fc027bc3ca4474c29d4c76bd10b5658dfc4 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sun, 1 Nov 2015 03:37:25 -0800 Subject: [PATCH] Remove some uses of capitalized 'URL' (shadows window.URL). --- src/Archive/Redirect.coffee | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Archive/Redirect.coffee b/src/Archive/Redirect.coffee index a4ed92584..f9e915851 100755 --- a/src/Archive/Redirect.coffee +++ b/src/Archive/Redirect.coffee @@ -59,10 +59,10 @@ Redirect = # For fuuka-based archives: # https://github.com/eksopl/fuuka/issues/27 protocol = Redirect.protocol archive - URL = "#{protocol}#{archive.domain}/_/api/chan/post/?board=#{boardID}&num=#{postID}" - return '' unless Redirect.securityCheck URL + url = "#{protocol}#{archive.domain}/_/api/chan/post/?board=#{boardID}&num=#{postID}" + return '' unless Redirect.securityCheck url - URL + url file: (archive, {boardID, filename}) -> "#{Redirect.protocol archive}#{archive.domain}/#{boardID}/full_image/#{filename}" @@ -89,8 +89,8 @@ Redirect = report: (archive, {boardID, postID}) -> "https://so.fgts.jp/report/?board=#{boardID}&no=#{postID}" - securityCheck: (URL) -> - /^https:\/\//.test(URL) or + securityCheck: (url) -> + /^https:\/\//.test(url) or location.protocol is 'http:' or Conf['Exempt Archives from Encryption']