0

I have a line of code which I want to execute

vTimeReq = 0;

But I want it to be executed through console. Is there any way to pass it to the console with a javascript file and execure it automatically?

P.S. If you ask why, it is because I have this one website, where I need to skip the timer and just inserting the script in a file doesn't help. The only way it will work would be through console.

Thanks a lot!

  • Are you sure that running it from a script doesn't work? It should run in the same global scope as in the console. You might have gotten the timing wrong, though. – Bergi Sep 08 '19 at 16:55
  • I tried multiple times. What exaclty do you mean by the timing? – Mark Litvinov Sep 08 '19 at 16:58
  • How does your chrome extension inject the script that runs this line of code? please show us what you tried there. By timing, i mean that you might have run the line of code right when the page did load, not when the timer was running (as it would probably happen when you used the devtools console) – Bergi Sep 08 '19 at 17:13
  • I have tried the "eval()" function, and just leaving this line of code for the entire js document. – Mark Litvinov Sep 08 '19 at 23:25
  • The solution is to put that code into a ` – wOxxOm Sep 09 '19 at 06:01

0 Answers0