mirror of
https://github.com/Fechin/reference.git
synced 2026-11-20 21:23:11 +03:00
373 B
373 B
title, tags, layout
| title | tags | layout | ||||
|---|---|---|---|---|---|---|
| How to detect macos browser in JavaScript |
|
note |
In this Article we will go through how to detect macos browser only using single line of code in JavaScript.
Let's define this short function:
const isMacBrowser = /Mac|iPod|iPhone|iPad/.test(navigator.platform);