Skip to content

Commit 77b25d9

Browse files
committed
Check Google-ish domain for Google hosted AMP.
1 parent 7cc6c94 commit 77b25d9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

amp2html.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
* License-Filename: LICENSE
55
*/
66

7-
// tests for AMP first, and then Google hosted iframed AMP
7+
// tests for AMP first, and then Google hosted AMP
88
if (document.querySelector("html[amp],html[⚡]") ||
99
(document.location.pathname.split('/')[1] == "amp" &&
10-
document.querySelector("g-full-page-view")) ) {
10+
document.location.hostname.split('.')[1] == "google") ) {
1111
var amp = document.head.querySelector("link[rel='amphtml'][href]"),
1212
canon = document.head.querySelector("link[rel='canonical'][href],link[rel='canonical']");
1313
if (null != canon && canon.href != null &&

0 commit comments

Comments
 (0)