mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-21 07:47:32 +09:00
Fix WebExtension startup and URI matching compatibility
This commit is contained in:
parent
1b90447aa4
commit
dbc2b42c7f
2 changed files with 16 additions and 3 deletions
|
|
@ -89,9 +89,22 @@ SingleMatchPattern.prototype = {
|
|||
let suffix = host.substr(2);
|
||||
let dotSuffix = "." + suffix;
|
||||
|
||||
return ({host}) => host === suffix || host.endsWith(dotSuffix);
|
||||
return uri => {
|
||||
try {
|
||||
let host = uri.host;
|
||||
return host === suffix || host.endsWith(dotSuffix);
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
}
|
||||
return uri => uri.host === host;
|
||||
return uri => {
|
||||
try {
|
||||
return uri.host === host;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
matches(uri, ignorePath = false) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue