Fix blocking of CloudFlare scripts.

This commit is contained in:
ccd0 2016-06-07 10:48:03 -07:00
parent 45f50d2764
commit 5383af8468
2 changed files with 2 additions and 0 deletions

View File

@ -798,6 +798,7 @@ Config =
http://www.google.com http://www.google.com
https://www.google.com https://www.google.com
https://www.gstatic.com https://www.gstatic.com
'self'
'unsafe-inline' 'unsafe-inline'
'unsafe-eval' 'unsafe-eval'
''' '''

View File

@ -50,6 +50,7 @@ Main =
$.global -> $.global ->
{whitelist} = document.currentScript.dataset {whitelist} = document.currentScript.dataset
whitelist = whitelist.split('\n').filter (x) -> x[0] isnt "'" whitelist = whitelist.split('\n').filter (x) -> x[0] isnt "'"
whitelist.push "#{location.protocol}//#{location.host}"
oldFun = {} oldFun = {}
for key in ['createElement', 'write'] for key in ['createElement', 'write']
oldFun[key] = document[key] oldFun[key] = document[key]