0

Is there an easy way to tell if chrome is under windows or mac/linux?

I have a webbapplication where the browser behaves different when running it on MAC and PC.

2 Answers 2

1

Yes there is. Hope the below code will help.

if (navigator.appVersion.indexOf("Win")!=-1){ //It is Windows }else if(navigator.appVersion.indexOf("Linux")!=-1){ //It is Linux }else if((navigator.appVersion.indexOf("Mac")!=-1){ //It is Mac } 
Sign up to request clarification or add additional context in comments.

Comments

1

Try this

function testOS(){ var mac=navigator.userAgent.match(/(Mac)/i)?true:false; if($.browser.webkit){ if(mac){ //Mac Code } else{ //window code } } } 

1 Comment

$.browser isnt supported in newer jquery versions?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.