simplify the code

window.onload may be already fired by the time extension content script is inserted. Anyway, thanks for the idea, I think I can improve this & remove check() function.