Left: | ||
Right: |
OLD | NEW |
---|---|
1 window.ext = Object.create(chrome.extension.getBackgroundPage().ext); | 1 (function() |
2 { | |
3 var backgroundPage = chrome.extension.getBackgroundPage(); | |
4 window.ext = Object.create(backgroundPage.ext); | |
2 | 5 |
3 ext.closePopup = function() | 6 ext.closePopup = function() |
4 { | 7 { |
5 window.close(); | 8 window.close(); |
6 }; | 9 }; |
10 | |
11 // We have to override ext.backgroundPage, because in order | |
12 // to send messages the local "chrome" namespace must be used. | |
13 ext.backgroundPage = { | |
14 sendMessage: chrome.runtime.sendMessage, | |
kzar
2015/03/02 19:00:32
Dumb idea: wrap the sendMessage call here to add a
Sebastian Noack
2015/03/02 19:42:08
Currently, we don't need that information. So addi
| |
15 | |
16 getWindow: function() | |
17 { | |
18 return backgroundPage; | |
19 } | |
20 }; | |
21 })(); | |
OLD | NEW |