From 5fb97a072b27f0a29d32e162fa887fce4daa03f5 Mon Sep 17 00:00:00 2001 From: Aaron Morris Date: Sun, 14 Jul 2019 11:01:08 -0700 Subject: [PATCH] Add gitignore. Add theme op to library to get theme variables. --- desktop/.gitignore | 1 + desktop/sources/scripts/library.js | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 desktop/.gitignore diff --git a/desktop/.gitignore b/desktop/.gitignore new file mode 100644 index 0000000..d8b83df --- /dev/null +++ b/desktop/.gitignore @@ -0,0 +1 @@ +package-lock.json diff --git a/desktop/sources/scripts/library.js b/desktop/sources/scripts/library.js index f917dce..50f3944 100644 --- a/desktop/sources/scripts/library.js +++ b/desktop/sources/scripts/library.js @@ -181,6 +181,11 @@ function Library (ronin) { return h[k] } + this.theme = (variable, el = document.documentElement) => { + // ex. styleprop('--f_high') to get css variable value + return getComputedStyle(el).getPropertyValue(variable) + } + // Math this.add = (...args) => {