Created
May 18, 2021 15:37
-
-
Save nalexiou-loc/e4b714f9d9b8c809a229a3a319a42a05 to your computer and use it in GitHub Desktop.
facebook browser fix for extjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var iOS = parseFloat( | |
('' + (/CPU.*OS ([0-9_]{1,5})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent) || [0,''])[1]) | |
.replace('undefined', '3_2').replace('_', '.').replace('_', '') | |
) || false; | |
if ( iOS ) | |
{ | |
var userAgent = navigator.userAgent; | |
navigator.__defineGetter__('userAgent', function(){ | |
if ( iOS ) | |
return userAgent.replace( 'like Gecko) Mobile', 'like Gecko) Version/' + iOS + '.0 Mobile' ) // customized user agent | |
else | |
return userAgent; | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment