Detect device type
Detects whether the page is being viewed on a mobile device or a desktop.
The JavaScript snippet collection contains a wide variety of ES6 helper functions. Browser snippets include helper functions for selecting, traversing, and manipulating DOM elements, while general-purpose helpers can be found in the JavaScript snippet collection.
Detects whether the page is being viewed on a mobile device or a desktop.
Easily and reliably calculate the width of the browser's vertical scrollbar with JavaScript.
Use a media query to check if the user prefers a light or dark color scheme.
Opens or closes an element in fullscreen mode.
Checks if two URLs are on the same origin.
Checks if the bottom of the page is visible.