mirror of
https://github.com/gorhill/uBlock.git
synced 2024-09-18 17:02:27 +02:00
[scriptlet engine] Mind old scriptlet names not using .js
Related commit:
- 5552d6717d
This commit is contained in:
parent
5c449f59f2
commit
b54522caa1
@ -205,8 +205,15 @@
|
|||||||
token = rawToken.slice(0, pos).trim();
|
token = rawToken.slice(0, pos).trim();
|
||||||
args = rawToken.slice(pos + 1).trim();
|
args = rawToken.slice(pos + 1).trim();
|
||||||
}
|
}
|
||||||
|
// TODO: The alias lookup can be removed once scriptlet resources
|
||||||
|
// with obsolete name are converted to their new name.
|
||||||
|
if ( reng.aliases.has(token) ) {
|
||||||
|
token = reng.aliases.get(token);
|
||||||
|
} else {
|
||||||
|
token = `${token}.js`;
|
||||||
|
}
|
||||||
content = reng.resourceContentFromName(
|
content = reng.resourceContentFromName(
|
||||||
`${token}.js`,
|
token,
|
||||||
'application/javascript'
|
'application/javascript'
|
||||||
);
|
);
|
||||||
if ( !content ) { return; }
|
if ( !content ) { return; }
|
||||||
|
Loading…
Reference in New Issue
Block a user