mirror of
https://github.com/minio/docs.git
synced 2025-04-19 21:02:14 +03:00
**Current behaviour:** https://github.com/minio/docs/assets/13393018/1c8b5762-9ee5-45ec-9e44-88f99c1750dd **Fix:** https://github.com/minio/docs/assets/13393018/658f7858-d793-40ca-87de-8f519a12dffa
20 lines
631 B
HTML
20 lines
631 B
HTML
<script>
|
|
// Dark mode and read mode detection
|
|
|
|
// Dark mode
|
|
var isDarkMode = localStorage.getItem("dark-mode");
|
|
var dmToggleBtn = document.getElementById("dark-mode-toggle");
|
|
if (isDarkMode === "true") {
|
|
document.documentElement.classList.add("dark-mode");
|
|
dmToggleBtn.classList.add("active");
|
|
}
|
|
|
|
// Read mode
|
|
var isReadMode = localStorage.getItem("read-mode");
|
|
var rmToggleBtn = document.getElementById("read-mode-toggle");
|
|
|
|
if (isReadMode === "true") {
|
|
document.documentElement.classList.add("read-mode");
|
|
rmToggleBtn.classList.add("active");
|
|
}
|
|
</script> |