mirror of https://github.com/gorhill/uBlock.git
Fix typo in new getScriptletArgs() method
Additionally, bring mv3 build up to date with latest changes to scriptlet framework.
This commit is contained in:
parent
fd036a51ee
commit
de6b1d361d
|
@ -174,7 +174,7 @@ const fromExtendedFilter = async function(details) {
|
|||
parser.parse(details.rawFilter);
|
||||
let compiled;
|
||||
if ( parser.isScriptletFilter() ) {
|
||||
compiled = JSON.stringify(parser.getScripletArgs());
|
||||
compiled = JSON.stringify(parser.getScriptletArgs());
|
||||
}
|
||||
|
||||
worker.postMessage({
|
||||
|
|
|
@ -158,7 +158,7 @@ const isolatedWorldInjector = (( ) => {
|
|||
})();
|
||||
|
||||
const normalizeRawFilter = function(parser, sourceIsTrusted = false) {
|
||||
const args = parser.getScripletArgs();
|
||||
const args = parser.getScriptletArgs();
|
||||
if ( args.length !== 0 ) {
|
||||
let token = `${args[0]}.js`;
|
||||
if ( reng.aliases.has(token) ) {
|
||||
|
|
|
@ -101,20 +101,7 @@ function addExtendedToDNR(context, parser) {
|
|||
context.scriptletFilters = new Map();
|
||||
}
|
||||
const exception = parser.isException();
|
||||
const root = parser.getBranchFromType(sfp.NODE_TYPE_EXT_PATTERN_SCRIPTLET);
|
||||
const walker = parser.getWalker(root);
|
||||
const args = [];
|
||||
for ( let node = walker.next(); node !== 0; node = walker.next() ) {
|
||||
switch ( parser.getNodeType(node) ) {
|
||||
case sfp.NODE_TYPE_EXT_PATTERN_SCRIPTLET_TOKEN:
|
||||
case sfp.NODE_TYPE_EXT_PATTERN_SCRIPTLET_ARG:
|
||||
args.push(parser.getNodeString(node));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
walker.dispose();
|
||||
const args = parser.getScriptletArgs();
|
||||
const argsToken = JSON.stringify(args);
|
||||
for ( const { hn, not, bad } of parser.getExtFilterDomainIterator() ) {
|
||||
if ( bad ) { continue; }
|
||||
|
|
|
@ -2374,7 +2374,7 @@ export class AstFilterParser {
|
|||
return arg.replace(this.reUnescapeCommas, '$1,');
|
||||
}
|
||||
|
||||
getScripletArgs() {
|
||||
getScriptletArgs() {
|
||||
const args = [];
|
||||
if ( this.isScriptletFilter() === false ) { return args; }
|
||||
const root = this.getBranchFromType(NODE_TYPE_EXT_PATTERN_SCRIPTLET);
|
||||
|
|
Loading…
Reference in New Issue