From 00e6c0120da611f340657b357605e387b6453a90 Mon Sep 17 00:00:00 2001 From: Fahad Akram <45397440+FaDiiiLeo@users.noreply.github.com> Date: Mon, 23 May 2022 02:54:42 +0500 Subject: [PATCH] Update script.js --- scripts/script.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/script.js b/scripts/script.js index 73b63a4..ff9e4f3 100644 --- a/scripts/script.js +++ b/scripts/script.js @@ -5,15 +5,15 @@ let themeValue = 1; function lastSelectedTheme(){ themeValue = localStorage.getItem('selectedTheme'); if(themeValue === '1'){ - themeStyleSheet.href = '/styles/themes/theme-1.css'; + themeStyleSheet.href = 'styles/themes/theme-1.css'; themeSelector.value = localStorage.getItem('toggleValue'); } else if(themeValue === '2'){ - themeStyleSheet.href = '/styles/themes/theme-2.css'; + themeStyleSheet.href = 'styles/themes/theme-2.css'; themeSelector.value = localStorage.getItem('toggleValue'); } else if(themeValue === '3'){ - themeStyleSheet.href = '/styles/themes/theme-3.css'; + themeStyleSheet.href = 'styles/themes/theme-3.css'; themeSelector.value = localStorage.getItem('toggleValue'); } } @@ -23,13 +23,13 @@ function selectTheme(){ themeSelector.addEventListener('input',function(){ themeValue = themeSelector.value; if(themeValue === '1'){ - themeStyleSheet.href = '/styles/themes/theme-1.css'; + themeStyleSheet.href = 'styles/themes/theme-1.css'; } else if(themeValue === '2'){ - themeStyleSheet.href = '/styles/themes/theme-2.css'; + themeStyleSheet.href = 'styles/themes/theme-2.css'; } else if(themeValue === '3'){ - themeStyleSheet.href = '/styles/themes/theme-3.css'; + themeStyleSheet.href = 'styles/themes/theme-3.css'; } if (typeof(Storage) !== 'undefined') { localStorage.setItem('selectedTheme', themeValue); @@ -40,4 +40,4 @@ function selectTheme(){ }) } -selectTheme(); \ No newline at end of file +selectTheme();