From c23fc4365ea29ea76aa16986d1fe2eae4b6525ea Mon Sep 17 00:00:00 2001 From: nobody Date: Sun, 8 Nov 2020 21:25:13 +0100 Subject: [PATCH] Added CDN: www.gstatic.com (#167) --- core/constants.js | 3 ++- core/mappings.js | 6 ++++++ modules/internal/rule-generator.js | 2 ++ pages/updates/updates.html | 1 + 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/core/constants.js b/core/constants.js index 0700f68b..d4e94896 100644 --- a/core/constants.js +++ b/core/constants.js @@ -264,7 +264,8 @@ const CDNs = { 'gitcdn.github.io': 'GitHub', 'cdn.bootcdn.net': 'BootCDN #2', 'vjs.zencdn.net': 'Video.js CDN', - 'cdn.plyr.io': 'Plyr CDN' + 'cdn.plyr.io': 'Plyr CDN', + 'www.gstatic.com': 'gstatic.com', }; // Supported charsets for TextDecoder() diff --git a/core/mappings.js b/core/mappings.js index 8f800464..6c68158f 100644 --- a/core/mappings.js +++ b/core/mappings.js @@ -868,6 +868,12 @@ mappings.cdn = { '/': { '{version}/plyr.svg': resources.plyrSVG } + }, + // gstatic + 'www.gstatic.com': { + '/': { + 'charts/loader.js': resources.googleCharts + } } }; diff --git a/modules/internal/rule-generator.js b/modules/internal/rule-generator.js index 14ab9088..3ea43567 100644 --- a/modules/internal/rule-generator.js +++ b/modules/internal/rule-generator.js @@ -32,6 +32,8 @@ ruleGenerator.openRuleSet = function ({ target }) { btnCopy = document.getElementById('button-copy-rule-set'); content = ''; + // Exclude www.gstatic.com + delete urls['www.gstatic.com']; textArea.style.display = 'block'; btnCopy.style.display = 'block'; diff --git a/pages/updates/updates.html b/pages/updates/updates.html index a9a5da74..c843946f 100644 --- a/pages/updates/updates.html +++ b/pages/updates/updates.html @@ -33,6 +33,7 @@
  • Added CDN: cdn.plyr.io (#165)
  • Fixed: Twitter Bootstrap (#166)
  • Fixed: Rule generator
  • +
  • Added CDN: www.gstatic.com (#167)