There's a function on a page that I want to call after it loads. I do not own the page, so I can't insert any html into it. Can you please provide specific examples how to do this with some chrome extension or greasemonkey? (function is submitAction()
).
Both Chrome extensions and greasemonkey offer ways to specify when the script you inject if executed.
In Chrome extension, you set that in the manifest :
"content_scripts": [
{
"run_at" : "document_idle",
In GreaseMonkey compatible userscripts, you set that in the metadata
// @run-at document-end
In both cases, you just have to add this to your script if you want to ensure resources are loaded when your function is executed :
document.addEventListener('load', submitAction);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With