Opa, as follows:
you create a variable and assign the parameter "Navigator.useragent", this variable will now hold the browser information.
See the position of this information inside the String that will be in this initial variable.
Now use the index in the variable that contains your browser information by assigning it to another variable ai is only you apply a simple if to call the Function that you want or not.
In my case I used an Alert instead of the function and the Firefox browser to test
Good luck my dear....
var browser = navigator.userAgent;
var qualbrowser = browser.indexOf('Firefox');
if(qualbrowser > 10){
alert(qualbrowser);
}
I didn’t look to see if your question has been answered before, but I found this one that I think can help you
– Daniel