diff options
author | Matthew S <matthewsot@outlook.com> | 2017-05-20 10:46:13 -0700 |
---|---|---|
committer | Matthew S <matthewsot@outlook.com> | 2017-05-20 10:46:13 -0700 |
commit | aa02796b6129ac5233f2ad0f28da0fcfab3c32b8 (patch) | |
tree | 5b02f40c4b0d25a8f97c2f7dd9457536c43e3bdb | |
parent | a2e2716230e76b552c350e834f67fb6e7bee97cd (diff) |
fixed (?) issue 2
Chrome no longer needs a special way of running inline scripts (actually
this method fixes issue 2 about the new CSP policies in Chrome)
-rw-r--r-- | utils.js | 14 |
1 files changed, 5 insertions, 9 deletions
@@ -65,15 +65,11 @@ docs.utils.createKeyboardEvent = function (type, info) { } docs.utils.runInPage = function (script) { - if (actionPluginPlatform === "firefox") { - var th = document.body; - var s = document.createElement('script'); - s.setAttribute('type', 'text/javascript'); - s.innerHTML = script; - th.appendChild(s); - return; - } - window.location = "javascript:" + script; + var th = document.body; + var s = document.createElement('script'); + s.setAttribute('type', 'text/javascript'); + s.innerHTML = script; + th.appendChild(s); }; //Thanks! https://stackoverflow.com/questions/1740700/how-to-get-hex-color-value-rather-than-rgb-value |