Pinned Loading
-
Easy unique ID generator to use as a...
Easy unique ID generator to use as a module 1let uniqueIDs = 0
2let uniqueIDsLength = 20
34export function id(name = '') {
5try {
-
Truncate text but don't break words
Truncate text but don't break words 1export const MAX_STR_LEN = 80
23/** This will split a sentence to a length of MAX_STR_LEN while not cutting through words. */
4export function truncate(str = "", length = MAX_STR_LEN) {
5str = str.trim()
-
Update viewport units to inner viewp...
Update viewport units to inner viewport everytime the screensize changes 1function setInnerViewport() {
2const vh = window.innerHeight * 0.01
3const vw = window.innerWidth * 0.01
4document.documentElement.style.setProperty("--vh", `${vh}px`)
5document.documentElement.style.setProperty("--vw", `${vw}px`)
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.