diff --git a/core/constants.js b/core/constants.js index a2d8848e..ba954225 100644 --- a/core/constants.js +++ b/core/constants.js @@ -216,28 +216,6 @@ const Links = { 'STATISTICS': chrome.extension.getURL('pages/statistics/statistics.html') }; -/** - * If a framework has been removed, this list should still display the names in the statistics - * Also used for bundles - * Note: Only the first two directory levels in 'resources' - * See: https://codeberg.org/nobody/LocalCDN/issues/151 - */ -const FrameworkAndBundle = { - 'resources/slick-carousel/1.9.0/': 'slick', - 'resources/anchor-js/4.2.2/': 'AnchorJS', - 'resources/plyr/3.5.10/': 'Plyr', - 'resources/swiper/5.4.2/': 'Swiper', - 'resources/select2/4.0.12/': 'Select2', - 'resources/element-ui/2.13.2/': 'ElementUI', - 'resources/bootstrap-datepicker/1.9.0/': 'Bootstrap DatePicker', - 'resources/jquery.lazy/1.7.11/': 'jQuery Lazy', - 'resources/waypoints/4.0.1/': 'Waypoints', - 'resources/findify-bundle/6.9.15/': 'Findify', - 'resources/twitter-bootstrap/4.5.0/': 'Bootstrap', - 'resources/twitter-bootstrap/3.4.1/': 'Bootstrap', - 'resources/twitter-bootstrap/2.3.2/': 'Bootstrap' -}; - const CDNs = { 'ajax.googleapis.com': 'Google Hosted Libraries', 'ajax.aspnetcdn.com': 'Microsoft Ajax CDN', diff --git a/pages/statistics/statistics.js b/pages/statistics/statistics.js index 444dcc9e..43a32243 100644 --- a/pages/statistics/statistics.js +++ b/pages/statistics/statistics.js @@ -187,7 +187,10 @@ statistics._displayNameOfFramework = function (str, type) { filename = targets.determineResourceName(filename); if (filename === 'Unknown') { - filename = FrameworkAndBundle[str]; + filename = targets.determineBundle(str); + if (filename === '' && str.startsWith('resources/fontawesome/')) { + filename = 'Font Awesome (Fonts)' + } } version = str.match(Resource.VERSION_EXPRESSION); if (version !== null && version.length > 0) { diff --git a/pages/updates/updates.html b/pages/updates/updates.html index b04d15b8..1ef5e518 100644 --- a/pages/updates/updates.html +++ b/pages/updates/updates.html @@ -44,6 +44,7 @@
  • Added: Modaal v0.4.4 (#172)
  • Added: inview (Protonet) v1.1.2 (#172)
  • Fixed: Import settings (#138)
  • +
  • Fixed: Unknown frameworks in statistics page (#151)