mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-10 01:02:08 +01:00
Fix broken mapping between scriptlet aliases and canonical name
Related commit:
bf591d93fb
This commit is contained in:
parent
c32c39fa6b
commit
62f2a3e68d
2 changed files with 7 additions and 7 deletions
|
@ -1954,13 +1954,13 @@ function noXhrIf(
|
|||
}
|
||||
if ( directive.startsWith('war:') ) {
|
||||
if ( warOrigin === undefined ) { return ''; }
|
||||
const warName = directive.slice(4);
|
||||
const fullpath = [ warOrigin, '/', warName ];
|
||||
const warSecret = scriptletGlobals.get('warSecret') || '';
|
||||
if ( warSecret !== '' ) {
|
||||
fullpath.push('?secret=', warSecret);
|
||||
}
|
||||
return new Promise(resolve => {
|
||||
const warName = directive.slice(4);
|
||||
const fullpath = [ warOrigin, '/', warName ];
|
||||
const warSecret = scriptletGlobals.get('warSecret');
|
||||
if ( warSecret !== undefined ) {
|
||||
fullpath.push('?secret=', warSecret);
|
||||
}
|
||||
const warXHR = new XMLHttpRequest();
|
||||
warXHR.responseType = 'text';
|
||||
warXHR.onloadend = ev => {
|
||||
|
|
|
@ -334,7 +334,7 @@ class RedirectEngine {
|
|||
this.resources.set(details.name, entry);
|
||||
if ( Array.isArray(details.aliases) === false ) { continue; }
|
||||
for ( const alias of details.aliases ) {
|
||||
this.aliases.set(alias, name);
|
||||
this.aliases.set(alias, details.name);
|
||||
}
|
||||
}
|
||||
this.modifyTime = Date.now();
|
||||
|
|
Loading…
Reference in a new issue