EandrewJones commented on code in PR #410: URL: https://github.com/apache/flagon-useralejs/pull/410#discussion_r1483171849
########## build/UserALEWebExtension/background.js: ########## @@ -1131,28 +1155,48 @@ var defaultConfig = { authHeader: null, toolName: 'useralePlugin', version: version + }, + pluginConfig: { + // Default to a regex that will match no string + urlWhitelist: '(?!x)x' } }; -browser.storage.local.get(defaultConfig, function (res) { - options(res.useraleConfig); -}); +var urlWhitelist; +function updateConfig(config) { + urlWhitelist = new RegExp(config.pluginConfig.urlWhitelist); + options(config.useraleConfig); + dispatchTabMessage(config.useraleConfig); +} function dispatchTabMessage(message) { browser.tabs.query({}, function (tabs) { tabs.forEach(function (tab) { browser.tabs.sendMessage(tab.id, message); }); }); } +function filterUrl(log) { Review Comment: Understood. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@flagon.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@flagon.apache.org For additional commands, e-mail: notifications-h...@flagon.apache.org