0

I want to make a custom userscript that will automate some clicks and typing through on websites using javascript. I want to be able to execute the javascript on any site.

I want the script to be able to run on multiple websites where I may or may not have access to other libraries like jQuery and I also want to do it safely such that the website will interpret the simulated events as real clicks and key presses.

I know that a click can be done on an element like this:

document.getElementsByClassName('classname')[0].click();

But, like I said, I want make a click as real as possible, which means that a hover would be necessary. So any tips on how can I do something similar for mouse over, mouse off, and key down, key up etc? Thanks!

T Mack
  • 950
  • 3
  • 12
  • 27

0 Answers0