It seems there is a new feature that allows users of Chrome mobile browser to save PDF versions of articles in the tap of a button. IIRC, it is currently only available for Google Chrome. The "Internet" browser shipped by Samsung on some Android devices seems to claim itself as Chrome in its user agent and the "Download" icon is shown on the articles loaded using that browser. The sad part of this is that for older versions of the browser, tapping on the "Download" button doesn't trigger the "Print" functionality. Instead it has no reaction, i.e. nothing happens.
Digging into this deeper, there seems to be a correlation with the button not working and older versions of Chrome.
**Screen shot**
{F11185625}
**Environment details**
//Browser name//: Internet
//Browser supplier//: Samsung
//Browser version//: 3.5.38.174
//Device model//: Samsung Galaxy `J2`
NOTE: This is not an issue in newer versions of the browser such as 6.2.xxx
NOTE: Per T182207 This is also an issue in Chrome.
= Acceptance criteria
[] We will disable the print button for Chrome browsers < version 41 by looking at the Chrome version number in the user agent.
[] We will also disable the print button for Android browsers where the version is less than 5.
[] for the user agent `Mozilla/5.0 (Linux; Android 5.1.1; SAMSUNG SM-J200G Build/LMY47X) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/3.5 Chrome/38.0.2125.102 Mobile Safari/537.36` do not show a print button
[] for `Mozilla/5.0 (Linux; Android 7.0; SAMSUNG SM-G950U1 Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/6.2 Chrome/56.0.2924.87 Mobile Safari/537.36` a button is shown
[] For `Mozilla/5.0 (Linux; Android 4.3; GT-I9300 Build/JSS15J) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.84 Mobile Safari/537.36` a button is not shown (Android 4)
[] If the browser is Chrome and the version of Chrome is 36.0.1985.135 or less, a button is not shown.
= Testing criteria
The change is live on the beta cluster.
Run through the acceptance criteria checklist and ensure the behaviour is as expected.
== Sign off steps
[-] Announce change on monthly reading updates (https://www.mediawiki.org/wiki/Reading/Status_updates/Next)
[-] Announce change on release timeline (https://www.mediawiki.org/wiki/Reading/Web/Release_timeline#January)
= Developer notes
Chrome version can be obtained like so:
```
var match = navigator.userAgent.match(/Chrome\/([0-9]*)/);
var version = match && match[1] ? parseInt( match[1], 10 ) : undefined;
match = ua.match(/android\s([0-9\.]*)/);
var androidVersion = match ? match[1] : false;
if ( version < 41 && androidVersion < 5) {
...
```
[] newer Samsung browsers using newer Chrome should show the print button, e.g. 7.1. We will assume they work until told otherwise.