Counter options page improved

This commit is contained in:
nobody 2022-04-10 10:18:19 +02:00
parent fd2d48b4b1
commit 4b55b8f26c
No known key found for this signature in database
GPG Key ID: 8F6DE3D614FCFD7A
1 changed files with 4 additions and 6 deletions

View File

@ -27,14 +27,13 @@ var optionsInfo = {};
*/
optionsInfo._renderCdnFrameworkSection = function () {
let unsupportedFrameworks, summarizedFrameworks, btnCDNs, btnFrameworks;
let unsupportedFrameworks, btnCDNs, btnFrameworks;
unsupportedFrameworks = 0;
summarizedFrameworks = 12;
optionsInfo._listOfFrameworks = {};
btnCDNs = document.getElementById('cdn');
btnCDNs.value = 'CDNs: ';
btnCDNs.value = 'CDNs (incl. CNAME): ';
btnFrameworks = document.getElementById('framework');
btnFrameworks.value = 'Frameworks: ';
@ -57,9 +56,8 @@ optionsInfo._renderCdnFrameworkSection = function () {
btnFrameworks.addEventListener('click', optionsInfo._btnCreateList);
btnCDNs.addEventListener('click', optionsInfo._btnCreateList);
// Reduce CDNs by 3, because loli.net includes = cdn.css.net, cdnjs.loli.net, ajax.loli.net, fonts.loli.net
btnCDNs.value += Object.keys(mappings.cdn).length - 3;
btnFrameworks.value += Object.keys(optionsInfo._listOfFrameworks).length - unsupportedFrameworks - summarizedFrameworks;
btnCDNs.value += Object.keys(mappings.cdn).length;
btnFrameworks.value += Object.keys(optionsInfo._listOfFrameworks).length - unsupportedFrameworks;
};
optionsInfo._renderLinkSection = function () {