Device Types
ms-code-device-show = "mobile"
Will only show on mobile devices and small tablets, regardless of the operating system.
Something only phones can do
ms-code-device-show = "!mobile"
Will hide on mobile devices and small tablets, regardless of the operating system.
Something phones can't do
ms-code-device-show = "desktop"
Will show on laptops, desktops, and any larger device, regardless of the operating system.
Something only desktops can do
ms-code-device-show = "touchdevice"
Will show on any touch device.
Start drawing
ms-code-device-show = "!touchdevice"
Will hide on any touch device.
Start clicking
ms-code-device-show = "landscape"
Will show on any device which is in landscape orientation.
Watch YouTube
ms-code-device-show = "portrait"
Will show on any device which is in portrait orientation.
Watch TikTok
Operating Systems
ms-code-device-show = "ios"
Will show on all devices running iOS - iPhones, iPads, and iPods.
View on App Store
ms-code-device-show = "!ios"
Will hide on all devices running iOS - iPhones, iPads, and iPods.
Open website
ms-code-device-show = "android"
Will show on all devices running an android operating system.
View on Play Store
ms-code-device-show = "!android"
Will hide on all devices running an android operating system.
Open website
ms-code-device-show = "!macos"
Will hide on all devices running MacOS.
Use web app
ms-code-device-show = "!windows"
Will hide on all devices running Windows.
Use web app
ms-code-device-show = "!linux"
Will hide on all devices running Linux.
Use web app
Browsers
While we're only showing the positive attributes (without a "!"), you can add the exclamation mark and it will still work as you intend it to!
ms-code-device-show = "chrome"
Will show for anyone using a Chromium-based browser.
Get Chrome Extension
Creating Conditions
When specifying your rules in the attribute values, you can use "&" to create an "and" rule (ex. If the device is MacOS AND is using Opera as a browser), and you can use "|" to create an "or" rule (ex. If the device is Linux OR Windows).