diff options
Diffstat (limited to 'app/scripts/contentscript.js')
-rw-r--r-- | app/scripts/contentscript.js | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/app/scripts/contentscript.js b/app/scripts/contentscript.js index 43ae5bc98..ad90059b7 100644 --- a/app/scripts/contentscript.js +++ b/app/scripts/contentscript.js @@ -2,12 +2,10 @@ const LocalMessageDuplexStream = require('./lib/local-message-stream.js') const PortStream = require('./lib/port-stream.js') const ObjectMultiplex = require('./lib/obj-multiplex') - - // inject in-page script var scriptTag = document.createElement('script') scriptTag.src = chrome.extension.getURL('scripts/inpage.js') -scriptTag.onload = function() { this.parentNode.removeChild(this) } +scriptTag.onload = function () { this.parentNode.removeChild(this) } var container = document.head || document.documentElement // append as first child container.insertBefore(scriptTag, container.children[0]) @@ -32,7 +30,7 @@ mx.pipe(pageStream) var reloadStream = mx.createStream('reload') reloadStream.on('error', console.error.bind(console)) -// if we lose connection with the plugin, trigger tab refresh -pluginStream.on('close', function(){ +// if we lose connection with the plugin, trigger tab refresh +pluginStream.on('close', function () { reloadStream.write({ method: 'reset' }) -})
\ No newline at end of file +}) |