aboutsummaryrefslogtreecommitdiff
path: root/src/ClientUtils.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2025-04-21 14:09:02 -0400
committerbobzel <zzzman@gmail.com>2025-04-21 14:09:02 -0400
commit3162f50295569d1798ac2cc881e9e0455bd12fea (patch)
treedf401ec5ef79bdc9dcc77ab4bca74e667d6ca090 /src/ClientUtils.ts
parent6fde11fd2c1a1edc36adc463af526b6d33399d5b (diff)
parent1f294ef4a171eec72a069a9503629eaf7975d983 (diff)
Merge branch 'master' into aarav_edit
Diffstat (limited to 'src/ClientUtils.ts')
-rw-r--r--src/ClientUtils.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ClientUtils.ts b/src/ClientUtils.ts
index e1f490c1a..03ff13924 100644
--- a/src/ClientUtils.ts
+++ b/src/ClientUtils.ts
@@ -476,7 +476,10 @@ export function smoothScrollHorizontal(duration: number, element: HTMLElement |
export function addStyleSheet() {
const style = document.createElement('style');
const sheets = document.head.appendChild(style);
- return sheets.sheet;
+ return sheets;
+}
+export function removeStyleSheet(sheet?: HTMLStyleElement) {
+ sheet && document.head.removeChild(sheet);
}
export function addStyleSheetRule(sheet: CSSStyleSheet | null, selector: string, css: string | { [key: string]: string }, selectorPrefix = '.') {
const propText =