diff --git a/readiness-tool/content_script.js b/readiness-tool/content_script.js index 90295c6..2bb9219 100644 --- a/readiness-tool/content_script.js +++ b/readiness-tool/content_script.js @@ -29,15 +29,19 @@ function findDetectedVendors(html, tabId) { totalTags = detectedVendors.supported.ads.length + detectedVendors.supported.analytics.length + + detectedVendors.supported.cms.length + detectedVendors.notSupported.ads.length + - detectedVendors.notSupported.analytics.length; + detectedVendors.notSupported.analytics.length + + detectedVendors.notSupported.cms.length; notSupported = detectedVendors.notSupported.ads.length + - detectedVendors.notSupported.analytics.length; + detectedVendors.notSupported.analytics.length + + detectedVendors.notSupported.cms.length; supported = detectedVendors.supported.ads.length + - detectedVendors.supported.analytics.length; + detectedVendors.supported.analytics.length + + detectedVendors.supported.cms.length; if (notSupported == 0 && supported > 0) { color = [122, 186, 122, 255]; @@ -86,10 +90,12 @@ function filteredVendors(htmlString, listAllVendors) { supported: { ads: [], analytics: [], + cms: [], }, notSupported: { ads: [], analytics: [], + cms: [], }, }; // for all the vendor objects in the vendors.json file @@ -107,7 +113,8 @@ function filteredVendors(htmlString, listAllVendors) { return; } else if ( vendorConfig.category != 'Ads' && - vendorConfig.category != 'Analytics' + vendorConfig.category != 'Analytics' && + vendorConfig.category != 'CMS' ) { console.error( 'The vendor', @@ -165,6 +172,12 @@ function addToDict( filteredVendors.notSupported.ads.push(vendorName); } break; + case 'CMS': + if (isSupported(vendorName)) { + filteredVendors.supported.cms.push(vendorName); + } else { + filteredVendors.notSupported.cms.push(vendorName); + } } } } @@ -184,12 +197,18 @@ function isVendorNameUnique(obj, vendorName) { if (obj.supported.analytics.includes(vendorName)) { count++; } + if (obj.supported.cms.includes(vendorName)) { + count++; + } if (obj.notSupported.ads.includes(vendorName)) { count++; } if (obj.notSupported.analytics.includes(vendorName)) { count++; } + if (obj.notSupported.cms.includes(vendorName)) { + count++; + } return count < 1; } diff --git a/readiness-tool/icons/Bing Ads.png b/readiness-tool/icons/Bing Ads.png new file mode 100644 index 0000000..d0eb585 Binary files /dev/null and b/readiness-tool/icons/Bing Ads.png differ diff --git a/readiness-tool/icons/BlueKai.png b/readiness-tool/icons/BlueKai.png new file mode 100644 index 0000000..25dacd8 Binary files /dev/null and b/readiness-tool/icons/BlueKai.png differ diff --git a/readiness-tool/icons/Branch.png b/readiness-tool/icons/Branch.png new file mode 100644 index 0000000..1310176 Binary files /dev/null and b/readiness-tool/icons/Branch.png differ diff --git a/readiness-tool/manifest.json b/readiness-tool/manifest.json index add6a19..e935b05 100644 --- a/readiness-tool/manifest.json +++ b/readiness-tool/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "AMP Readiness Tool", "description": "See at a glance the various third party vendors on the page and whether they have AMP support.", - "version": "2.8", + "version": "2.12", "options_page": "options.html", "icons": { "16": "amp-readiness.png", @@ -29,7 +29,8 @@ "all_frames": false, "run_at": "document_end", "exclude_globs": [ - "*.corp.google.com/*" + "*.corp.google.com/*", + "*.google.com/*" ] } ], diff --git a/readiness-tool/options.html b/readiness-tool/options.html index 3ed6d62..b152703 100644 --- a/readiness-tool/options.html +++ b/readiness-tool/options.html @@ -827,12 +827,12 @@ submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" -means any form of electronic, verbal, or written communiampion sent +means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to -communiampion on electronic mailing lists, source code control systems, +communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but -excluding communiampion that is conspicuously marked or otherwise +excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity @@ -981,4 +981,4 @@ - \ No newline at end of file + diff --git a/readiness-tool/popup.html b/readiness-tool/popup.html index 71a9357..9941559 100644 --- a/readiness-tool/popup.html +++ b/readiness-tool/popup.html @@ -114,6 +114,10 @@ margin-top: 35px; } + .cms-row { + margin-top: 35px; + } + .collapsible { color: #1c79c0; text-transform: uppercase; @@ -291,6 +295,7 @@

+
@@ -300,8 +305,13 @@

-
+
+ +
+
+ + @@ -314,14 +324,19 @@

- +
- +
+ +
+ +
+
diff --git a/readiness-tool/popup.js b/readiness-tool/popup.js index 126c11a..96d340b 100644 --- a/readiness-tool/popup.js +++ b/readiness-tool/popup.js @@ -8,12 +8,18 @@ let supportedAds; /* @const {!Element} */ let supportedAnalytics; +/* @const {!Element} */ +let supportedCMS; + /* @const {!Element} */ let notSupportedAds; /* @const {!Element} */ let notSupportedAnalytics; +/* @const {!Element} */ +let notSupportedCMS; + /* @const {string} */ const loadingMessage = "Loading..."; @@ -30,19 +36,25 @@ chrome.storage.onChanged.addListener(function(changes, namespace) { function showLoading() { supportedAds = document.getElementById('ads-supported'); supportedAnalytics = document.getElementById('analytics-supported'); + supportedCMS = document.getElementById('cms-supported'); notSupportedAds = document.getElementById('ads-notSupported'); notSupportedAnalytics = document.getElementById('analytics-notSupported'); + notSupportedCMS = document.getElementById('cms-notSupported'); - supportedAds.textContent = supportedAnalytics.textContent = - notSupportedAds.textContent = notSupportedAnalytics.textContent = + + supportedAds.textContent = supportedAnalytics.textContent = + supportedCMS.textContent = notSupportedAds.textContent = + notSupportedAnalytics.textContent = notSupportedCMS.textContent = loadingMessage; } window.onload = function onWindowLoad() { supportedAds = document.getElementById('ads-supported'); supportedAnalytics = document.getElementById('analytics-supported'); + supportedCMS = document.getElementById('cms-supported'); notSupportedAds = document.getElementById('ads-notSupported'); notSupportedAnalytics = document.getElementById('analytics-notSupported'); + notSupportedCMS = document.getElementById('cms-notSupported'); }; /** @@ -103,8 +115,9 @@ function showSupportedVendorsInView(detectedVendors, listAllVendors) { return; } - supportedAds.textContent = supportedAnalytics.textContent = - notSupportedAds.textContent = notSupportedAnalytics.textContent = + supportedAds.textContent = supportedAnalytics.textContent = + supportedCMS.textContent = notSupportedAds.textContent = + notSupportedAnalytics.textContent = notSupportedCMS.textContent = blankMessage; supportedAds.appendChild( makeList(detectedVendors.supported.ads, false, listAllVendors) @@ -112,18 +125,26 @@ function showSupportedVendorsInView(detectedVendors, listAllVendors) { supportedAnalytics.appendChild( makeList(detectedVendors.supported.analytics, false, listAllVendors) ); + supportedCMS.appendChild( + makeList(detectedVendors.supported.cms, false, listAllVendors) + ); notSupportedAds.appendChild( makeList(detectedVendors.notSupported.ads, true, listAllVendors) ); notSupportedAnalytics.appendChild( makeList(detectedVendors.notSupported.analytics, true, listAllVendors) ); + notSupportedCMS.appendChild( + makeList(detectedVendors.notSupported.cms, true, listAllVendors) + ); totalTags = detectedVendors.supported.ads.length + detectedVendors.supported.analytics.length + + detectedVendors.supported.cms.length + detectedVendors.notSupported.ads.length + - detectedVendors.notSupported.analytics.length; + detectedVendors.notSupported.analytics.length + + detectedVendors.notSupported.cms.length; } /** diff --git a/readiness-tool/vendors.json b/readiness-tool/vendors.json index 2ba74e5..2b557bc 100644 --- a/readiness-tool/vendors.json +++ b/readiness-tool/vendors.json @@ -220,7 +220,7 @@ "regex": [ "googletagmanager\\.com/ns\\.html[^>]+>" ] + }, + "Bing Ads": { + "category": "Ads", + "regex": [ + "" + ] + }, + "BlueKai": { + "category": "Ads", + "regex":[ + "__bkframe" + ] + }, + "Adobe Experience Manager": { + "category": "CMS", + "regex":[ + "
]+data-component-path=\"[^\"+]jcr:" + ] + }, + "Wordpress": { + "category": "CMS", + "regex":[ + "]+wp-(?:content|includes)", + "]+s\\d+\\.wp\\.com" + ] } } -} \ No newline at end of file +}