This is my extension code, no way to have the listener trigger, I also tried removing the filters whole but nothing, it must be one of those dumb mistakes that I cannot see:
const filter_1 = {
url:
[
{urlMatches: "^\w*:\/\/\w*\.creoweb\.com\/data\/$"},
{urlMatches: "^\w*:\/\/\w*\.creoweb\.com\/cp\/\w*\/history\/$"}
]
};
const filter_2 = {
url:
[
{urlMatches: "^\w*:\/\/\w*\.creoweb\.com\/user\/\d+\/panel\/$"}
]
};
function sample1(details) {
console.log(`onCompleted => sample1: ${details.url}`);
}
function sample2(details) {
console.log(`onCompleted => sample2: ${details.url}`);
}
console.log('here'); //this trigger
browser.webNavigation.onCompleted.addListener(sample1, filter_1);
console.log('here 2'); //this never
browser.webNavigation.onCompleted.addListener(sample2, filter_2);
console.log('here 3'); //this never