Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/uPagge/uBlogger.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoruPagge <upagge@mail.ru>2020-12-09 21:24:05 +0300
committeruPagge <upagge@mail.ru>2020-12-09 21:24:05 +0300
commita5525322c062df38c43ab86aaff1527700085178 (patch)
tree25366e67c3922c25d6eca8565ad8363730e65f99 /src
parent76a23ebe787a258545e8c963fc0fb38a3dcbae67 (diff)
Theme switch remark42
Diffstat (limited to 'src')
-rw-r--r--src/js/theme.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/js/theme.js b/src/js/theme.js
index 719f0fd..b54cef9 100644
--- a/src/js/theme.js
+++ b/src/js/theme.js
@@ -33,6 +33,11 @@ class Theme {
this.config = window.config;
this.data = this.config.data;
this.isDark = document.body.getAttribute('theme') === 'dark';
+ if (this.isDark) {
+ window.REMARK42.changeTheme('dark');
+ } else {
+ window.REMARK42.changeTheme('light');
+ }
this.util = new Util();
this.newScrollTop = this.util.getScrollTop();
this.oldScrollTop = this.newScrollTop;