How to build firefox with the isTrusted parameter as true for all javascript-sent events?

  Kiến thức lập trình

How can I modify firefox to have stuff like window.click always have the attribute isTrusted:True without breaking the rest of the build? I tried to modify ./dom/Events.h to return “true” when IsTrsuted() is called. (deleting “mEvent->isTrusted()”). But then the software would not launch once built.

I want all interactions from javascript scripts and maybe even the dev console to have the isTrusted:true property.

Why? Because I’m trying to lazily use a website, which seems to break any time that I call click or keydown from the console. It doesn’t matter how I pass the events to the website – I can perfectly mimic the keyboard and mouse events pretty much to the letter – Yes, I set up watchers to watch practically every event type, and then sent them all in the right order. The “isTrusted” property seems to be the only thing different. I am NOT scraping or doing anything that would piss off the website owner as far as i can tell, I’m just on one page always, trying to use it in an automated way.

All this to say, if anyone knows a way that i can pass “isTrusted:True” to make the events that i send from the javascript console similar to my human-initiated mouse/keyboard events, please share

LEAVE A COMMENT