MCPcopy
hub / github.com/mailvelope/mailvelope / init

Function init

src/content-scripts/main.js:50–64  ·  view source on GitHub ↗
(preferences, watchlist)

Source from the content-addressed store, hash-verified

48}
49
50function 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
66function registerEventListener() {
67 port.on('destroy', onDestroy);

Callers 2

registerEventListenerFunction · 0.70
onDestroyFunction · 0.70

Calls 4

detectHostFunction · 0.85
onFunction · 0.70
initMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected