Created
April 12, 2013 22:20
-
-
Save jalbertbowden/5375621 to your computer and use it in GitHub Desktop.
Detecting Opera Mini using the window.operamini property via http://dev.opera.com/articles/view/opera-mini-and-javascript/#detectingmini
Opera Mini also includes an operamini object as a property of the window object. To check for the presence of this object, use the following code.
This file contains hidden or 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 isOperaMini = Object.prototype.toString.call(window.operamini) === "[object OperaMini]" |
doesn't work((
i have opera mini device and even this code doesn't work
var isOperaMini = !!(Object.prototype.toString.call(window.operamini) === "[object OperaMini]" || (navigator.userAgent.indexOf('Opera Mini') > -1) || (navigator.userAgent.indexOf('OperaMini') > -1) || !!window['operamini']);
Opera Mini 4.5
On Google Chrome device emulator it works
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Why not just