From ebc3de755860803e42e777c25de7a6ad3b51d4cc Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Fri, 7 Jun 2019 23:50:30 -0700 Subject: [PATCH 1/6] Remove AMP-specific class name from WordPress detection --- src/apps.json | 1 - 1 file changed, 1 deletion(-) diff --git a/src/apps.json b/src/apps.json index 289825e20..e2e6447b9 100644 --- a/src/apps.json +++ b/src/apps.json @@ -11506,7 +11506,6 @@ ], "html": [ "]+/wp-(?:content|includes)/", - "]*class=[\"']amp-wp-", "]+s\\d+\\.wp\\.com" ], "icon": "WordPress.svg", From 0e4c4a432371a34d579c670b11d49f42bf1a1638 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Fri, 7 Jun 2019 23:50:50 -0700 Subject: [PATCH 2/6] Add detection of WordPress AMP plugin --- src/apps.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/apps.json b/src/apps.json index e2e6447b9..1ad210c64 100644 --- a/src/apps.json +++ b/src/apps.json @@ -115,6 +115,20 @@ "icon": "Accelerated-Mobile-Pages.svg", "website": "https://www.ampproject.org" }, + "AMP Plugin": { + "cats": [ + 1, + 11 + ], + "icon": "Accelerated-Mobile-Pages.svg", + "implies": [ + "WordPress" + ], + "meta": { + "generator": "^AMP Plugin v\\d+\\.\\d+" + }, + "website": "https://amp-wp.org" + }, "Azure": { "cats": [ 62 From 12234b397efd2aafa7cd2e44603c35c7d0af3642 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Sat, 8 Jun 2019 09:56:14 -0700 Subject: [PATCH 3/6] Replace category 11 (Blogs) with category 5 (Widgets) --- src/apps.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apps.json b/src/apps.json index 1ad210c64..7c292f4b9 100644 --- a/src/apps.json +++ b/src/apps.json @@ -118,7 +118,7 @@ "AMP Plugin": { "cats": [ 1, - 11 + 5 ], "icon": "Accelerated-Mobile-Pages.svg", "implies": [ From 9d53d132067b301a98be0279190eebc904156da6 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Sat, 8 Jun 2019 10:03:21 -0700 Subject: [PATCH 4/6] Add capture groups for plugin version and (optionally) mode --- src/apps.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apps.json b/src/apps.json index 7c292f4b9..955c7b0b4 100644 --- a/src/apps.json +++ b/src/apps.json @@ -125,7 +125,7 @@ "WordPress" ], "meta": { - "generator": "^AMP Plugin v\\d+\\.\\d+" + "generator": "^AMP Plugin v(\\d+\\.\\d+.*?)(?:;\\s*mode=(\\w+))?$" }, "website": "https://amp-wp.org" }, From 4609b6f1d064dbaa4af708788db6a2a9c7fe8d28 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Sun, 16 Jun 2019 22:13:33 -0700 Subject: [PATCH 5/6] Add capture group for experiences; name the groups --- src/apps.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apps.json b/src/apps.json index 955c7b0b4..824c8b998 100644 --- a/src/apps.json +++ b/src/apps.json @@ -125,7 +125,7 @@ "WordPress" ], "meta": { - "generator": "^AMP Plugin v(\\d+\\.\\d+.*?)(?:;\\s*mode=(\\w+))?$" + "generator": "^AMP Plugin v(\\d+\\.\\d+.*?)(?:;\\s*mode=(\\w+))?(?:;\\s*experiences=(\\w+))?$\\;version:\\1\\;mode:\\2\\;experiences:\\3" }, "website": "https://amp-wp.org" }, From bd02405e98e54cbbcb26f821967af81b2f208029 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Sun, 23 Jun 2019 08:05:56 +0200 Subject: [PATCH 6/6] Eliminate additional capture groups from AMP plugin regex --- src/apps.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apps.json b/src/apps.json index 824c8b998..e91972ed8 100644 --- a/src/apps.json +++ b/src/apps.json @@ -125,7 +125,7 @@ "WordPress" ], "meta": { - "generator": "^AMP Plugin v(\\d+\\.\\d+.*?)(?:;\\s*mode=(\\w+))?(?:;\\s*experiences=(\\w+))?$\\;version:\\1\\;mode:\\2\\;experiences:\\3" + "generator": "^AMP Plugin v(\\d+\\.\\d+.*)$\\;version:\\1" }, "website": "https://amp-wp.org" },