From 7ae4090d345fee46389fcdd8c64cc635f4778f42 Mon Sep 17 00:00:00 2001 From: sandipSubedi Date: Sun, 11 Oct 2020 21:33:19 -0500 Subject: [PATCH] Dark mode --- index.html | 4 ++++ js/main.js | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/index.html b/index.html index 0fed973..8215fbc 100644 --- a/index.html +++ b/index.html @@ -14,6 +14,10 @@ + + diff --git a/js/main.js b/js/main.js index 7c78297..41ce120 100644 --- a/js/main.js +++ b/js/main.js @@ -1,5 +1,6 @@ window.addEventListener('load', () => { initDT(); // Initialize the DatatTable and window.columnNames variables + addDarkmodeWidget(); const repo = getRepoFromUrl(); @@ -14,6 +15,10 @@ document.getElementById('form').addEventListener('submit', e => { fetchData(); }); +function addDarkmodeWidget() { + new Darkmode( { label: '🌓' } ).showWidget(); +} + function fetchData() { const repo = document.getElementById('q').value; const re = /[-_\w]+\/[-_.\w]+/;