Permalink
Browse files

Add googleweblight to JS blacklist

Google runs JS on their proxy servers and outputs a page which may
be broken in creative ways (e.g. clicking anywhere triggers the
fundraising banner). Treat them as a non-JS browser to minimize
bugginess.

Currently broken with CentralNotice banner:
https://googleweblight.com/?lite_url=https://en.wikipedia.org

Images below the fold never load:
https://googleweblight.com/?lite_url=https://en.wikipedia.org/wiki/Barack_Obama

Bug: T152602
Change-Id: Ia277ab51634b770a950616a842bedb29fcbf1f12
  • Loading branch information...
ejegg committed Dec 13, 2016
1 parent 5c6c93c commit 9dd76898da94079a54b9073b9d09a8026507cbdd
Showing with 4 additions and 2 deletions.
  1. +1 −1 resources/src/startup.js
  2. +3 −1 tests/qunit/suites/resources/startup.test.js
View
@@ -75,7 +75,7 @@ function isCompatible( str ) {
// support in the modern run-time.
// Note: Please extend the regex instead of adding new ones
!(
ua.match( /webOS\/1\.[0-4]|SymbianOS|Series60|NetFront|Opera Mini|S40OviBrowser|MeeGo|Android.+Glass|^Mozilla\/5\.0 .+ Gecko\/$/ ) ||
ua.match( /webOS\/1\.[0-4]|SymbianOS|Series60|NetFront|Opera Mini|S40OviBrowser|MeeGo|Android.+Glass|^Mozilla\/5\.0 .+ Gecko\/$|googleweblight/ ) ||
ua.match( /PlayStation/i )
)
);
@@ -139,7 +139,9 @@
// MeeGo
'Mozilla/5.0 (MeeGo; NokiaN9) AppleWebKit/534.13 (KHTML, like Gecko) NokiaBrowser/8.5.0 Mobile Safari/534.13',
// UC Mini (speed mode on)
'Mozilla/5.0 (X11; U; Linux i686; zh-CN; r:1.2.3.4) Gecko/'
'Mozilla/5.0 (X11; U; Linux i686; zh-CN; r:1.2.3.4) Gecko/',
// Google Web Light proxy
'Mozilla/5.0 (Linux; Android 4.2.1; en-us; Nexus 5 Build/JOP40D) AppleWebKit/535.19 (KHTML, like Gecko; googleweblight) Chrome/38.0.1025.166 Mobile Safari/535.19'
]
};

0 comments on commit 9dd7689

Please sign in to comment.