|
|
@ -37,12 +37,11 @@ |
|
|
|
|
|
|
|
|
|
|
|
<body> |
|
|
|
<body> |
|
|
|
<% dark_forest_address_var = Application.get_env(:block_scout_web, :dark_forest_address) %> |
|
|
|
<% dark_forest_address_var = Application.get_env(:block_scout_web, :dark_forest_address) %> |
|
|
|
<% dark_forest_address = if dark_forest_address_var, do: String.downcase(dark_forest_address_var), else: nil %> |
|
|
|
<% dark_forest_address = if dark_forest_address_var, do: String.downcase(dark_forest_address_var), else: nil %> |
|
|
|
<script> |
|
|
|
<script> |
|
|
|
function applyCustomMode() { |
|
|
|
function applyCustomMode() { |
|
|
|
const darkForestContractAddressHash = "<%= dark_forest_address %>" |
|
|
|
const darkForestContractAddressHash = "<%= dark_forest_address %>" |
|
|
|
|
|
|
|
|
|
|
|
const addressHash = "<%= @address.hash %>".toLowerCase() |
|
|
|
|
|
|
|
if (window.location.pathname.toLowerCase().includes(darkForestContractAddressHash)) { |
|
|
|
if (window.location.pathname.toLowerCase().includes(darkForestContractAddressHash)) { |
|
|
|
document.body.className += " " + "dark-forest-theme-applied"; |
|
|
|
document.body.className += " " + "dark-forest-theme-applied"; |
|
|
|
} |
|
|
|
} |
|
|
|