aboutsummaryrefslogtreecommitdiff
path: root/src/Utils.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2021-01-29 15:50:08 -0500
committerbobzel <zzzman@gmail.com>2021-01-29 15:50:08 -0500
commit8709e3617aa44f7b374aff4346227a4400ff6faf (patch)
treee05567623ad0409b67916dc95ea869dfed89570d /src/Utils.ts
parent076e49222a26fe395c8658bdebc7de433c1bd3d7 (diff)
added flag to turn off audio anchors. made audio doc appear when clicking on audiotag.
Diffstat (limited to 'src/Utils.ts')
-rw-r--r--src/Utils.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Utils.ts b/src/Utils.ts
index 39fc3dae4..c7074c3da 100644
--- a/src/Utils.ts
+++ b/src/Utils.ts
@@ -500,9 +500,9 @@ export function addStyleSheet(styleType: string = "text/css") {
const sheets = document.head.appendChild(style);
return (sheets as any).sheet;
}
-export function addStyleSheetRule(sheet: any, selector: any, css: any) {
+export function addStyleSheetRule(sheet: any, selector: any, css: any, selectorPrefix = ".") {
const propText = typeof css === "string" ? css : Object.keys(css).map(p => p + ":" + (p === "content" ? "'" + css[p] + "'" : css[p])).join(";");
- return sheet.insertRule("." + selector + "{" + propText + "}", sheet.cssRules.length);
+ return sheet.insertRule(selectorPrefix + selector + "{" + propText + "}", sheet.cssRules.length);
}
export function removeStyleSheetRule(sheet: any, rule: number) {
if (sheet.rules.length) {