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

Popular posts from this blog

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -