mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
[scriptlet engine] Mind old scriptlet names not using .js
Related commit:
- 5552d6717d
This commit is contained in:
parent
5c449f59f2
commit
b54522caa1
1 changed files with 8 additions and 1 deletions
|
|
@ -205,8 +205,15 @@
|
|||
token = rawToken.slice(0, pos).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(
|
||||
`${token}.js`,
|
||||
token,
|
||||
'application/javascript'
|
||||
);
|
||||
if ( !content ) { return; }
|
||||
|
|
|
|||
Loading…
Reference in a new issue