(preferences, watchlist)
| 48 | } |
| 49 | |
| 50 | function init(preferences, watchlist) { |
| 51 | prefs = preferences; |
| 52 | watchList = watchlist; |
| 53 | detectHost(); |
| 54 | if (clientApiActive) { |
| 55 | // api case |
| 56 | clientAPI.init(); |
| 57 | } else { |
| 58 | // non-api case ... use provider specific content scripts |
| 59 | providers.init(prefs); |
| 60 | currentProvider = providers.get(host); |
| 61 | // turn on DOM scan |
| 62 | on(); |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | function registerEventListener() { |
| 67 | port.on('destroy', onDestroy); |
no test coverage detected