Home > Software engineering >  How to inject external javascript code in phone browser
How to inject external javascript code in phone browser

Time:12-26

I would like to inject an external javascript code into a certain webpage in a mobile phone browser such as chrome or opera mini. On computers, we can do this directly in the console or through extensions such as Scripty. Unfortunately, phone browsers don't show consoles nor do they have extensions. Please how can I achieve this?

CodePudding user response:

If you are using android, then you can use chrome inspect to access console on phone browser using a computer.

  1. First you should connect your phone to your computer via USB and authorize it.
  2. In Chrome on your computer open the following link chrome://inspect
  3. There you can see opened tabs on your mobile device, and open their console.

CodePudding user response:

You can use Step0 Step1 Step2

Since all the codes will be in one line, make sure you use semicolons properly.

  • Related