Code style improved
This commit is contained in:
parent
05ea59029f
commit
3ae0eccc3d
|
@ -104,7 +104,8 @@ requestAnalyzer.getLocalTarget = function (requestDetails, initiator) {
|
|||
destinationHost,
|
||||
destinationPath,
|
||||
destinationSearchString,
|
||||
initiator);
|
||||
initiator
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
|
@ -124,7 +125,7 @@ requestAnalyzer._matchBasePath = function (hostMappings, channelPath) {
|
|||
|
||||
// eslint-disable-next-line max-len
|
||||
requestAnalyzer._findLocalTarget = function (resourceMappings, basePath, channelHost, channelPath, destinationSearchString, initiator) {
|
||||
let resourcePath, versionNumber, resourcePattern, filename, shorthandResource;
|
||||
let resourcePath, versionNumber, resourcePattern, shorthandResource;
|
||||
|
||||
storageManager.type.get(Setting.LOGGING, function (items) {
|
||||
requestAnalyzer.logging = items.enableLogging;
|
||||
|
@ -158,9 +159,7 @@ requestAnalyzer._findLocalTarget = function (resourceMappings, basePath, channel
|
|||
}
|
||||
|
||||
for (let resourceMold of Object.keys(resourceMappings)) {
|
||||
if (!resourcePattern.startsWith(resourceMold)) {
|
||||
continue;
|
||||
}
|
||||
if (resourcePattern.startsWith(resourceMold)) {
|
||||
let targetPath, versionDelivered, versionRequested, bundle;
|
||||
targetPath = resourceMappings[resourceMold].path;
|
||||
targetPath = targetPath.replace(Resource.VERSION_PLACEHOLDER, versionNumber);
|
||||
|
@ -182,7 +181,7 @@ requestAnalyzer._findLocalTarget = function (resourceMappings, basePath, channel
|
|||
// Get bundle name
|
||||
bundle = targets.determineBundle(targetPath);
|
||||
if (bundle !== '') {
|
||||
targetPath = requestAnalyzer._getPathOfBundle(initiator, channelPath, targetPath, bundle);
|
||||
targetPath = requestAnalyzer._getPathOfBundle(initiator, channelHost, channelPath, targetPath, bundle);
|
||||
}
|
||||
if (targetPath === false) {
|
||||
break;
|
||||
|
@ -201,6 +200,7 @@ requestAnalyzer._findLocalTarget = function (resourceMappings, basePath, channel
|
|||
'bundle': bundle
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
if (requestAnalyzer.logging && !IgnoredHost[channelHost]) {
|
||||
console.warn(`${LogString.PREFIX} ${LogString.MISSING_RESOURCE} ${channelHost}${channelPath}`);
|
||||
|
@ -209,7 +209,7 @@ requestAnalyzer._findLocalTarget = function (resourceMappings, basePath, channel
|
|||
return false;
|
||||
};
|
||||
|
||||
requestAnalyzer._getPathOfBundle = function (initiator, channelPath, targetPath, bundle) {
|
||||
requestAnalyzer._getPathOfBundle = function (initiator, channelHost, channelPath, targetPath, bundle) {
|
||||
let filename = channelPath.split('/').pop();
|
||||
if (bundle === 'MathJax (Bundle)' && filename !== 'MathJax.js') {
|
||||
filename = channelPath.replace(Resource.MATHJAX, '');
|
||||
|
@ -219,8 +219,7 @@ requestAnalyzer._getPathOfBundle = function (initiator, channelPath, targetPath,
|
|||
return false;
|
||||
}
|
||||
}
|
||||
return helpers.formatFilename(
|
||||
filename.endsWith('.js')
|
||||
return helpers.formatFilename(filename.endsWith('.js')
|
||||
? `${targetPath + filename}m`
|
||||
: targetPath + filename);
|
||||
};
|
||||
|
|
|
@ -69,8 +69,8 @@ body {
|
|||
|
||||
.div-selected-icon {
|
||||
margin-top: 10px;
|
||||
width: 100%;
|
||||
padding-right: 25px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.div-selected-icon > label {
|
||||
|
|
Loading…
Reference in New Issue