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.
Serializes a cookie name-value pair into a Set-Cookie header string.
JavaScript, Browser · Oct 22, 2020
Detects whether the page is being viewed on a mobile device or a desktop.
JavaScript, Browser · Oct 22, 2020
Checks if the user color scheme preference is dark
.
JavaScript, Browser · Oct 22, 2020
Checks if the user color scheme preference is light
.
JavaScript, Browser · Oct 22, 2020
Calculates the width of the window's vertical scrollbar.
JavaScript, Browser · Jul 16, 2022
Gets the protocol being used on the current page.
JavaScript, Browser · Oct 20, 2020
Checks if the element specified is visible in the viewport.
JavaScript, Browser · Oct 22, 2020
Opens or closes an element in fullscreen mode.
JavaScript, Browser · Oct 19, 2020
Checks if localStorage
is enabled.
JavaScript, Browser · Dec 31, 2020
Checks if sessionStorage
is enabled.
JavaScript, Browser · Dec 31, 2020
Checks if the bottom of the page is visible.
JavaScript, Browser · Oct 22, 2020