Note for self: a good snippet how to mock user-agent in JavaScript:
var __originalNavigator = navigator; navigator = new Object(); navigator.__proto__ = __originalNavigator; navigator.__defineGetter__('userAgent', function () { return 'Custom'; });
Taken from http://stackoverflow.com/questions/1307013/mocking-a-useragent-in-javascript .
Note for self: a good snippet how to mock user-agent in JavaScript:
Taken from http://stackoverflow.com/questions/1307013/mocking-a-useragent-in-javascript .