Last active
May 20, 2021 18:39
-
-
Save shwaydogg/a89bed8be1f3d97e60c5f2bb2a078a01 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://climateclock.world/widget-v2.js" async></script> | |
<script> | |
var loadedCallback = function(){ | |
// Handler when the DOM is fully loaded | |
document.getElementsByClassName("header-announcement-bar-wrapper")[0].setAttribute("style", "padding-top: 0;"); | |
document.getElementsByClassName("header-inner container--fluid header-mobile-layout-logo-left-nav-right header-layout-nav-right")[0].setAttribute("style", "flex-wrap: wrap;"); | |
var e = document.getElementsByClassName("header-display-desktop")[0]; | |
//debugger; | |
e.insertAdjacentHTML('beforebegin', "<div style='width: 100%; padding: 1vw 0;'><climate-clock /></div>"); | |
}; | |
if ( | |
document.readyState === "complete" || | |
(document.readyState !== "loading" && !document.documentElement.doScroll) | |
) { | |
loadedCallback(); | |
} else { | |
document.addEventListener("DOMContentLoaded", loadedCallback); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment