Start Vanilla JavaScript After IMVU HP has fully loaded

Don Von Alpha Dom
by Don Von Alpha Dom · 3 posts
2 years ago in IMVU Homepage Codes
Posted 1 year ago · Author
Code
<script>
const pageLoaded = setTimeout(start, 2000);

function start() {
   if(document.getElementById("footerBanner")) {
      clearTimeout(pageLoaded);
      //Place your code below this line
   }
}
</script>


This code waits till the footer of the page has loaded before running any other Javascript. It re-checks for the footer every 2 seconds. This code works with vanilla JavaScript, no jQuery needed.
Posted 9 months ago
Thanks for the post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Sign in

Already have an account? Sign in here

SIGN IN NOW

Create an account

Sign up for a new account in our community. It's easy!

REGISTER A NEW ACCOUNT