java.js
// Used to toggle the dark theme option
Used to toggle the dark theme option
Used to toggle the dark theme option
function toggleDarkMode() {
	var entiredocument = document.body;
	entiredocument.classList.toggle("dark-mode");
	const dmb = document.getElementById("darkmodebutton");
	if (isDarkModeEnabled === 0) {
		isDarkModeEnabled = 1;
		changeObjectColor("darkmodebutton", "white", "black");
		dmb.innerHTML = "Disable Dark Mode";
		changeObjectColor("snackbar", "white", "black");
		displaySnackbar(3000, "Dark mode enabled!");
	} else {
		isDarkModeEnabled = 0;
		changeObjectColor("darkmodebutton", "black", "white");
		dmb.innerHTML = "Enable Dark Mode";
		changeObjectColor("snackbar", "black", "white");
		displaySnackbar(3000, "Dark mode disabled!");
	}
	setCookie("darkthemesaved", isDarkModeEnabled, 2000);
}
function toggleDarkMode ( ) { var entiredocument = document . body ; entiredocument . classList . toggle ( "dark-mode" ) ; const dmb = document . getElementById ( "darkmodebutton" ) ; if ( isDarkModeEnabled === 0 ) { isDarkModeEnabled = 1 ; changeObjectColor ( "darkmodebutton" , "white" , "black" ) ; dmb . innerHTML = "Disable Dark Mode" ; changeObjectColor ( "snackbar" , "white" , "black" ) ; displaySnackbar ( 3000 , "Dark mode enabled!" ) ; } else { isDarkModeEnabled = 0 ; changeObjectColor ( "darkmodebutton" , "black" , "white" ) ; dmb . innerHTML = "Enable Dark Mode" ; changeObjectColor ( "snackbar" , "black" , "white" ) ; displaySnackbar ( 3000 , "Dark mode disabled!" ) ; } setCookie ( "darkthemesaved" , isDarkModeEnabled , 2000 ) ; }
Used to toggle the dark theme option
Used to toggle the dark theme option