summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew S <matthewsot@outlook.com>2017-05-20 10:46:13 -0700
committerMatthew S <matthewsot@outlook.com>2017-05-20 10:46:13 -0700
commitaa02796b6129ac5233f2ad0f28da0fcfab3c32b8 (patch)
tree5b02f40c4b0d25a8f97c2f7dd9457536c43e3bdb
parenta2e2716230e76b552c350e834f67fb6e7bee97cd (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.js14
1 files changed, 5 insertions, 9 deletions
diff --git a/utils.js b/utils.js
index 2d4d913..6ab223b 100644
--- a/utils.js
+++ b/utils.js
@@ -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
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback