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

github.com/MeiK2333/github-style.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'static/js/theme-mode.js')
-rw-r--r--static/js/theme-mode.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/static/js/theme-mode.js b/static/js/theme-mode.js
index 58b58a1..c1f9bab 100644
--- a/static/js/theme-mode.js
+++ b/static/js/theme-mode.js
@@ -1,11 +1,16 @@
function switchTheme() {
const currentStyle = currentTheme();
+ var iconElement = document.getElementById('github-icon');
if (currentStyle == 'light') {
setTheme('dark');
+ iconElement.removeAttribute('fill');
+ iconElement.setAttribute('class', 'octicon Header-link');
}
else {
setTheme('light');
+ iconElement.setAttribute('fill', '#24292e');
+ iconElement.setAttribute('class', 'Header-link');
}
}
@@ -25,4 +30,4 @@ function currentTheme() {
(() => {
setTheme(currentTheme());
-})(); \ No newline at end of file
+})();