window.onload

window.onload = function() {
  // Some code
};
Lonely Lyrebird