Remove some uses of capitalized 'URL' (shadows window.URL).
This commit is contained in:
parent
1fec007b79
commit
95ba0fc027
@ -59,10 +59,10 @@ Redirect =
|
|||||||
# For fuuka-based archives:
|
# For fuuka-based archives:
|
||||||
# https://github.com/eksopl/fuuka/issues/27
|
# https://github.com/eksopl/fuuka/issues/27
|
||||||
protocol = Redirect.protocol archive
|
protocol = Redirect.protocol archive
|
||||||
URL = "#{protocol}#{archive.domain}/_/api/chan/post/?board=#{boardID}&num=#{postID}"
|
url = "#{protocol}#{archive.domain}/_/api/chan/post/?board=#{boardID}&num=#{postID}"
|
||||||
return '' unless Redirect.securityCheck URL
|
return '' unless Redirect.securityCheck url
|
||||||
|
|
||||||
URL
|
url
|
||||||
|
|
||||||
file: (archive, {boardID, filename}) ->
|
file: (archive, {boardID, filename}) ->
|
||||||
"#{Redirect.protocol archive}#{archive.domain}/#{boardID}/full_image/#{filename}"
|
"#{Redirect.protocol archive}#{archive.domain}/#{boardID}/full_image/#{filename}"
|
||||||
@ -89,8 +89,8 @@ Redirect =
|
|||||||
report: (archive, {boardID, postID}) ->
|
report: (archive, {boardID, postID}) ->
|
||||||
"https://so.fgts.jp/report/?board=#{boardID}&no=#{postID}"
|
"https://so.fgts.jp/report/?board=#{boardID}&no=#{postID}"
|
||||||
|
|
||||||
securityCheck: (URL) ->
|
securityCheck: (url) ->
|
||||||
/^https:\/\//.test(URL) or
|
/^https:\/\//.test(url) or
|
||||||
location.protocol is 'http:' or
|
location.protocol is 'http:' or
|
||||||
Conf['Exempt Archives from Encryption']
|
Conf['Exempt Archives from Encryption']
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user