1
0
mirror of https://codeberg.org/nobody/LocalCDN.git synced 2025-06-05 21:49:31 +02:00

Added: MathJax (minimal) v2.7.5 (#75)

This commit is contained in:
nobody
2021-05-26 06:56:35 +02:00
parent 5f977b68a4
commit 6ee175eabb
49 changed files with 1277 additions and 2 deletions

View File

@ -166,16 +166,23 @@ requestAnalyzer._findLocalTarget = function (resourceMappings, basePath, channel
versionDelivered = versionDelivered.toString();
targetPath = targetPath.replace(versionNumber, versionDelivered);
versionRequested = versionNumber === null ? 'latest' : versionNumber[0];
if (versionNumber === null) {
versionDelivered = targetPath.match(Resource.VERSION_EXPRESSION).toString();
versionRequested = 'latest';
} else {
versionRequested = versionNumber[0];
}
// Get bundle name
bundle = targets.determineBundle(targetPath);
if (bundle !== '') {
filename = channelPath.split('/').pop();
if (bundle === 'MathJax (Bundle)' && filename !== 'MathJax.js') {
filename = channelPath.replace(Resource.MATHJAX, '');
if (!MathJaxFiles[filename]) {
break;
}
}
targetPath = (filename.endsWith('.js')) ? `${targetPath + filename}m` : targetPath + filename;
targetPath = helpers.formatFilename(targetPath);
}