Skip to content

Commit

Permalink
fix: correct scope
Browse files Browse the repository at this point in the history
  • Loading branch information
seia-soto committed Aug 7, 2024
1 parent 7bd29ee commit d2352e9
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions src/converters/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,18 @@ function getPathDirname(path) {
return path.slice(lastOfLastIndex + 1, lastIndex);
}

const allowedResourceExtensions = [
'html',
'js',
'css',
'mp4',
'mp3',
'xml',
'txt',
'json',
'empty',
];

function getPreferredResource(aliases) {
// ignore non-supported files and manually created uBO aliases by AdGuard
return aliases.find(alias => {
Expand All @@ -33,17 +45,6 @@ function getPreferredResource(aliases) {

export function generateResourcesMapping() {
const resourcesMapping = new Map();
const allowedResourceExtensions = [
'html',
'js',
'css',
'mp4',
'mp3',
'xml',
'txt',
'json',
'empty',
];

for (const redirect of redirects) {
// Skip, in case of AdGuard-only resource
Expand Down

0 comments on commit d2352e9

Please sign in to comment.