Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save shwaydogg/a89bed8be1f3d97e60c5f2bb2a078a01 to your computer and use it in GitHub Desktop.
Save shwaydogg/a89bed8be1f3d97e60c5f2bb2a078a01 to your computer and use it in GitHub Desktop.
<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