there's an ad code causing problem with my javascript code and when i talked to their support team, they told me to Not use `window.onload`

here's their replay

> 
> Just don't use window.onload. Better get familiar with
>  addEventListener / attachEvent. The onload can be (and possibly is)
>  overwritten by our adcode.
> 
> 
> 

then what should i use in this case to make my code work instead of window.onload ?

here's my full javascript code that includes `window.onload`

```
function startChecking() {
    secondsleft -= 1e3, document.querySelector(".load_vid").innerHTML = "Please Wait.. " + Math.abs(secondsleft / 1e3) + " Seconds", 0 == secondsleft && (clearInterval(interval), $(".reloadframe").show() + $(".share").show(), document.querySelector(".load_vid").style.display = "none"/*, document.querySelector(".frame_src").style.display = "", document.querySelector(".frame_src").src = document.querySelector(".frame_src").getAttribute("data-src"), $("#btn_play_s").hide()*/,$("#btn_play_s").show())
}

function startschedule() {
    document.querySelector(".frame_src").src = "about:blank", clearInterval(interval), secondsleft = threshold, document.querySelector(".load_vid").innerHTML = "Please Wait.. " + Math.abs(secondsleft / 1e3) + " Seconds", interval = setInterval(function() {
        startChecking()
    }, 1e3)
}

function resetTimer() {
    startschedule()
}
var timeout, interval, threshold = 1e4,
    secondsleft = threshold;
window.onload = function() {
  $("#btn_play_s").hide()
    startschedule()
};

$(function(){$(".vid_link").on("click",function(){$(this).toggleClass("vid_link_selc").siblings().removeClass("vid_link_selc")})});

function reloadthis() {
    var ifr = document.getElementsByName('right')[0];
    ifr.src = ifr.src;
}

```