Skip to content
This repository was archived by the owner on Feb 19, 2025. It is now read-only.

Commit 08a6338

Browse files
committed
Fix syntax
1 parent a761d67 commit 08a6338

File tree

6 files changed

+16
-6
lines changed

6 files changed

+16
-6
lines changed

build/UserALEWebExtension/background.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1163,6 +1163,7 @@ var defaultConfig = {
11631163
};
11641164
var urlWhitelist;
11651165
function updateConfig(config) {
1166+
console.log(config);
11661167
urlWhitelist = new RegExp(config.pluginConfig.urlWhitelist);
11671168
options(config.useraleConfig);
11681169
// TODO: tabs need a page load to apply this config change.
@@ -1185,7 +1186,9 @@ function filterUrl(log) {
11851186
}
11861187
browser.storage.local.get(defaultConfig, function (res) {
11871188
// Apply url filter to logs generated by the background page.
1188-
addCallbacks(filterUrl);
1189+
addCallbacks({
1190+
filterUrl: filterUrl
1191+
});
11891192
updateConfig(res);
11901193
});
11911194
browser.runtime.onMessage.addListener(function (message, sender, sendResponse) {
@@ -1199,6 +1202,7 @@ browser.runtime.onMessage.addListener(function (message, sender, sendResponse) {
11991202
// Apply url filter to logs generated outside the background page.
12001203
log$1 = filterUrl(log$1);
12011204
if (log$1) {
1205+
console.log("match");
12021206
log(log$1);
12031207
}
12041208
break;

build/UserALEWebExtension/content.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1100,6 +1100,7 @@ function options(newConfig) {
11001100
// browser is defined in firefox, but chrome uses the 'chrome' global.
11011101
var browser = browser || chrome;
11021102
function rerouteLog(log) {
1103+
console.log("reroute");
11031104
browser.runtime.sendMessage({
11041105
type: ADD_LOG,
11051106
payload: log
@@ -1128,7 +1129,9 @@ function rerouteLog(log) {
11281129

11291130
browser.storage.local.get("useraleConfig", function (res) {
11301131
options(res.useraleConfig);
1131-
addCallbacks(rerouteLog);
1132+
addCallbacks({
1133+
rerouteLog: rerouteLog
1134+
});
11321135
});
11331136
browser.runtime.onMessage.addListener(function (message) {
11341137
if (message.type === CONFIG_CHANGE) {

build/UserALEWebExtension/options.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1100,6 +1100,7 @@ function options(newConfig) {
11001100
// browser is defined in firefox, but chrome uses the 'chrome' global.
11011101
var browser = browser || chrome;
11021102
function rerouteLog(log) {
1103+
console.log("reroute");
11031104
browser.runtime.sendMessage({
11041105
type: ADD_LOG,
11051106
payload: log
@@ -1126,7 +1127,9 @@ function rerouteLog(log) {
11261127
* limitations under the License.
11271128
*/
11281129

1129-
addCallbacks(rerouteLog);
1130+
addCallbacks({
1131+
rerouteLog: rerouteLog
1132+
});
11301133
function setConfig() {
11311134
var config = {
11321135
url: document.getElementById("url").value,

src/UserALEWebExtension/background.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ function filterUrl(log) {
6565

6666
browser.storage.local.get(defaultConfig, (res) => {
6767
// Apply url filter to logs generated by the background page.
68-
userale.addCallbacks(filterUrl);
68+
userale.addCallbacks({filterUrl});
6969
updateConfig(res);
7070
});
7171

src/UserALEWebExtension/content.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { rerouteLog, browser } from './globals.js';
2323

2424
browser.storage.local.get("useraleConfig", (res) => {
2525
userale.options(res.useraleConfig);
26-
userale.addCallbacks(rerouteLog);
26+
userale.addCallbacks({rerouteLog});
2727
});
2828

2929
browser.runtime.onMessage.addListener(function (message) {

src/UserALEWebExtension/options.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import * as MessageTypes from './messageTypes.js';
2020
import * as userale from '../main.js'
2121
import { rerouteLog, browser } from './globals.js';
2222

23-
userale.addCallbacks(rerouteLog);
23+
userale.addCallbacks({rerouteLog});
2424

2525
// TODO: Warn users when setting credentials with unsecured connection.
2626
const mitmWarning = "Setting credentials with http will expose you to a MITM attack. Are you sure you want to continue?";

0 commit comments

Comments
 (0)