diff --git a/data/aggregate.js b/data/aggregate.js index 14ef6ec..b54ccd5 100644 --- a/data/aggregate.js +++ b/data/aggregate.js @@ -143,12 +143,18 @@ function onLoad(connections) { console.debug('aggregate::onLoad end, took %s ms', Date.now() - startTime); } +function updateUIFromMetadata(metadata) { + console.debug("in aggregate metadata"); + global.updateUIFromMetadata(metadata); +} + function updateUIFromPrefs(prefs) { console.debug("in aggregate prefs"); global.updateUIFromPrefs(prefs); } aggregate.on('load', onLoad); +aggregate.on("updateUIFromMetadata", updateUIFromMetadata); aggregate.on("updateUIFromPrefs", updateUIFromPrefs); // Constants for indexes of properties in array format diff --git a/data/content-script.js b/data/content-script.js index 468406e..5de2a1d 100644 --- a/data/content-script.js +++ b/data/content-script.js @@ -30,8 +30,14 @@ self.port.on('init', function () { global.aggregate.emit('load', global.allConnections); }); +self.port.on("updateUIFromMetadata", function (metadata) { + console.debug("Got add-on metadata", metadata); + global.aggregate.emit("updateUIFromMetadata", metadata); +}); + self.port.on("updateUIFromPrefs", function (prefs) { console.debug("Got set prefs", prefs); global.aggregate.emit("updateUIFromPrefs", prefs); }); + })(this); diff --git a/data/index.html b/data/index.html index d4a5db8..87b4b65 100644 --- a/data/index.html +++ b/data/index.html @@ -204,7 +204,7 @@