mirror of https://github.com/gorhill/uBlock.git
Fix broken mapping between scriptlet aliases and canonical name
Related commit:
bf591d93fb
This commit is contained in:
parent
c32c39fa6b
commit
62f2a3e68d
|
@ -1954,13 +1954,13 @@ function noXhrIf(
|
||||||
}
|
}
|
||||||
if ( directive.startsWith('war:') ) {
|
if ( directive.startsWith('war:') ) {
|
||||||
if ( warOrigin === undefined ) { return ''; }
|
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 => {
|
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();
|
const warXHR = new XMLHttpRequest();
|
||||||
warXHR.responseType = 'text';
|
warXHR.responseType = 'text';
|
||||||
warXHR.onloadend = ev => {
|
warXHR.onloadend = ev => {
|
||||||
|
|
|
@ -334,7 +334,7 @@ class RedirectEngine {
|
||||||
this.resources.set(details.name, entry);
|
this.resources.set(details.name, entry);
|
||||||
if ( Array.isArray(details.aliases) === false ) { continue; }
|
if ( Array.isArray(details.aliases) === false ) { continue; }
|
||||||
for ( const alias of details.aliases ) {
|
for ( const alias of details.aliases ) {
|
||||||
this.aliases.set(alias, name);
|
this.aliases.set(alias, details.name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.modifyTime = Date.now();
|
this.modifyTime = Date.now();
|
||||||
|
|
Loading…
Reference in New Issue