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

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -