Spatial Digger
Spatial Digger

Reputation: 1993

Add alert if using firefox

I have an issue on my webpage, it's not running properly for some reason in firefox.

How do I alert Firefox users only with an alert/dialogue that there is an issue using their browser?

Upvotes: 0

Views: 67

Answers (1)

Fran Perejón
Fran Perejón

Reputation: 101

you can do the following thing:

<!DOCTYPE html>
<html>
<head>
</head>
<body>

<script type='text/javascript'>
    const isFirefox = typeof InstallTrigger !== 'undefined';
    if (isFirefox){
        alert('Danger!');  
    }
</script>
</body>
</html>

Hope that could help you!

Upvotes: 1

Related Questions