Navigation, clipboard, unique ID, and fixed element adjustment utilities
Redirects to the specified URL after a delay (in milliseconds). Pass 'refresh' or omit the URL to reload the current page. Default delay is 1ms.
Copies the target input's text to the clipboard. The button must have a data-target-input-id attribute pointing to the input's id. Shows a snackbar notification on success or failure.
Generates a cryptographically secure unique ID (UUID v4) using crypto.randomUUID().
Adjusts the <footer> element's padding-bottom to account for a fixed/sticky element at the bottom of the viewport. Measures the fixed element's height and adds it to the footer's original padding. If the fixed element is hidden by CSS (e.g. via media queries), the original padding is restored.
Run Sadrazam.Document.help() in the browser console to see all available methods and their descriptions.
All static methods available on Sadrazam.Document
| Method | Parameters | Returns | Description |
|---|---|---|---|
| redirect(url, time?) | url: string, time?: number (ms, default: 1) | void | Redirects to the URL after a delay. Pass 'refresh' to reload. |
| copyInputText(button) | button: HTMLElement (with data-target-input-id) | void | Copies the target input's text to clipboard. Shows snackbar feedback. |
| uniqueId() | — | string | Generates a cryptographically secure UUID v4. |
| fixedElementAdjust(selector) | selector: string (CSS selector) | void | Adjusts footer padding-bottom to account for a fixed element's height. |
| help() | — | void | Prints available methods to the console. |