1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 01:39:44 +01:00

Merge pull request #116 from MetaMask/i30

contentscript - append inpage as first child
This commit is contained in:
kumavis 2016-04-18 11:50:51 -07:00
commit fdc74b7e87

View File

@ -7,7 +7,8 @@ var scriptTag = document.createElement('script')
scriptTag.src = chrome.extension.getURL('scripts/inpage.js')
scriptTag.onload = function() { this.parentNode.removeChild(this) }
var container = document.head || document.documentElement
container.appendChild(scriptTag)
// append as first child
container.insertBefore(scriptTag, container.children[0])
// setup communication to page and plugin
var pageStream = new LocalMessageDuplexStream({