added the readyState complete check for cases where the library is injected after web page loads.