|
|
@ -39,14 +39,16 @@ |
|
|
|
<% raw_dark_forest_addresses = CustomContractsHelpers.get_raw_dark_forest_addresses_list() %> |
|
|
|
<% raw_dark_forest_addresses = CustomContractsHelpers.get_raw_dark_forest_addresses_list() %> |
|
|
|
<script> |
|
|
|
<script> |
|
|
|
function applyCustomMode() { |
|
|
|
function applyCustomMode() { |
|
|
|
const darkForestContractAddressHashes = "<%= raw_dark_forest_addresses %>".split(',').map(hash => hash.toLowerCase()) |
|
|
|
const darkForestContractAddressHashesRaw = "<%= raw_dark_forest_addresses %>" |
|
|
|
|
|
|
|
if (darkForestContractAddressHashesRaw !== "") { |
|
|
|
darkForestContractAddressHashes.forEach(darkForestContractAddressHash => { |
|
|
|
const darkForestContractAddressHashes = darkForestContractAddressHashesRaw.split(',').map(hash => hash.toLowerCase()) |
|
|
|
if (window.location.pathname.toLowerCase().includes(darkForestContractAddressHash)) { |
|
|
|
darkForestContractAddressHashes.forEach(darkForestContractAddressHash => { |
|
|
|
document.body.className += " " + "dark-forest-theme-applied"; |
|
|
|
if (window.location.pathname.toLowerCase().includes(darkForestContractAddressHash)) { |
|
|
|
return; |
|
|
|
document.body.className += " " + "dark-forest-theme-applied"; |
|
|
|
} |
|
|
|
return; |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
function applyDarkMode() { |
|
|
|
function applyDarkMode() { |
|
|
|
if (localStorage.getItem("current-color-mode") === "dark") { |
|
|
|
if (localStorage.getItem("current-color-mode") === "dark") { |
|
|
|