From 14c91ed81f68574df8c350e14c8cb09739014562 Mon Sep 17 00:00:00 2001 From: Philipp Kunz Date: Fri, 26 Nov 2021 15:26:15 +0100 Subject: [PATCH] fix(core): update --- ts/domtools.classes.domtools.ts | 16 +++++++++++++--- ts/domtools.css.theme.ts | 2 +- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/ts/domtools.classes.domtools.ts b/ts/domtools.classes.domtools.ts index 0199cae..042610b 100644 --- a/ts/domtools.classes.domtools.ts +++ b/ts/domtools.classes.domtools.ts @@ -110,6 +110,7 @@ export class DomTools { private runOnceTrackerStringMap = new Stringmap(); private runOnceResultMap = new FastMap(); + /** * run a function once and always get the Promise of the first execution * @param identifierArg the indentifier arg identifies functions. functions with the same identifier are considered equal @@ -135,7 +136,10 @@ export class DomTools { } // setStuff - + /** + * allows to set global styles + * @param stylesText the css text you want to set + */ public async setGlobalStyles(stylesText: string) { await this.domReady.promise; const styleElement = document.createElement('style'); @@ -144,6 +148,10 @@ export class DomTools { this.elements.headElement.appendChild(styleElement); } + /** + * allows setting external css files + * @param cssLinkArg a url to an external stylesheet + */ public async setExternalCss(cssLinkArg: string) { const cssTag = document.createElement('link'); cssTag.rel = 'stylesheet'; @@ -152,8 +160,10 @@ export class DomTools { document.head.append(cssTag); } - - + /** + * allows setting of website infos + * @param optionsArg the website info + */ public async setWebsiteInfo(optionsArg: plugins.websetup.IWebSetupConstructorOptions) { await this.websetup.setup(optionsArg); await this.websetup.readyPromise; diff --git a/ts/domtools.css.theme.ts b/ts/domtools.css.theme.ts index 48f01ea..a6608d2 100644 --- a/ts/domtools.css.theme.ts +++ b/ts/domtools.css.theme.ts @@ -5,7 +5,7 @@ import { DomTools } from './domtools.classes.domtools'; */ export const scrollBarStyles = (() => { const returnStyles = - navigator.userAgent.indexOf('Windows') !== -1 + navigator.userAgent.indexOf('Mac OS X') !== -1 ? ` /* width */ ::-webkit-scrollbar {