How to call a javascript function after the page loads with a chrome extension? -
there's function on page want call after loads. not own page, can't insert html it. can please provide specific examples how chrome extension or greasemonkey? (function submitaction()
).
both chrome extensions , greasemonkey offer ways specify when script inject if executed.
in chrome extension, you set in manifest :
"content_scripts": [ { "run_at" : "document_idle",
in greasemonkey compatible userscripts, set in metadata
// @run-at document-end
in both cases, have add script if want ensure resources loaded when function executed :
document.addeventlistener('load', submitaction);
Comments
Post a Comment