Jump to content

Inspect element on phone?

Go to solution Solved by Biohazard777,
15 minutes ago, Skipple said:

On Android: in Chorme address bar type "view-source:" before the "HTTP" and reload the page.

That will do just what the name implies, viewing source... which is a far cry from DevTools (right click -> inspect element, on desktop browsers).

@stefanmz I'm guessing you want something more like this:
image.png.9e3cad4076d3c3ac62d410c9e88de4a8.png

If so:
https://github.com/liriliri/eruda
 

Just now, Skipple said:

It would help if you specified what phone you have any what browser you use. 

 

On Android: in Chorme address bar type "view-source:" before the "HTTP" and reload the page.

Huh, OK thanks! Well I have a Samsung but it doesn't matter about the browser, I have Chrome so I will try that, thanks! Can you do it in Firefox on mobile too, just curious because that's what I am regularly using. 

Link to post
Share on other sites

15 minutes ago, Skipple said:

On Android: in Chorme address bar type "view-source:" before the "HTTP" and reload the page.

That will do just what the name implies, viewing source... which is a far cry from DevTools (right click -> inspect element, on desktop browsers).

@stefanmz I'm guessing you want something more like this:
image.png.9e3cad4076d3c3ac62d410c9e88de4a8.png

If so:
https://github.com/liriliri/eruda
 

Link to post
Share on other sites

6 minutes ago, Biohazard777 said:

That will do just what the name implies, viewing source... which is a far cry from DevTools (right click -> inspect element, on desktop browsers).

@stefanmz I'm guessing you want something more like this:
image.png.9e3cad4076d3c3ac62d410c9e88de4a8.png

If so:
https://github.com/liriliri/eruda
 

Wow I didn't even think this would have been an option so I decided view is better than nothing.  Thanks! Exactly what I needed. More technically advanced to setup but I am gonna manage.

Link to post
Share on other sites

26 minutes ago, stefanmz said:

Wow I didn't even think this would have been an option so I decided view source us better than nothing.  Thanks! Exactly what I needed. More technically advanced to setup but I am gonna manage.

You are welcome.

Pro tip:
Add a new bookmark (to whatever, you will edit it anyway in a second).
image.png.20759a1bf5ddbf8af6c9411b39625dcc.png

In the URL paste the code from github readme, or copy from bellow:

javascript:(function () { var script = document.createElement('script'); script.src="https://cdn.jsdelivr.net/npm/eruda"; document.body.append(script); script.onload = function () { eruda.init(); } })();

Confirm changes.

Then on the page you want to "inspect", in the address bar start typing "Insp..."
And then tap on the auto-fill arrow:
image.png.2bf025cc945b0bec7c9881c7c81b1fae.png

Hit enter on the phone KB,
once the script is loaded cogwheel button will show up in the lower right corner (tap that for DevTools).
 

Link to post
Share on other sites

24 minutes ago, Biohazard777 said:

You are welcome.

Pro tip:
Add a new bookmark (to whatever, you will edit it anyway in a second).
image.png.20759a1bf5ddbf8af6c9411b39625dcc.png

In the URL paste the code from github readme, or copy from bellow:

javascript:(function () { var script = document.createElement('script'); script.src="https://cdn.jsdelivr.net/npm/eruda"; document.body.append(script); script.onload = function () { eruda.init(); } })();

Confirm changes.

Then on the page you want to "inspect", in the address bar start typing "Insp..."
And then tap on the auto-fill arrow:
image.png.2bf025cc945b0bec7c9881c7c81b1fae.png

Hit enter on the phone KB,
once the script is loaded cogwheel button will show up in the lower right corner (tap that for DevTools).
 

Great but I didn't understand how to load it. I tried to paste it before the http address of the page but that didn't work.  How exactly do you activate it? Where does it go in the address bar and where does the site URL go?

Link to post
Share on other sites

2 minutes ago, stefanmz said:

Great but I didn't understand how to load it. I tried to paste it before the http address of the page but that didn't work.  How exactly do you activate it? Where does it go in the address bar and where does the site URL go?

You need to completely replace the URL.
- First you open up the website you wish to inspect, for example visit https://linustechtips.com/
- Wait for the site to load.
- Then in the URL input field select everything.
- Paste the code. (thus  "https://linustechtips.com/" becomes "javascript:(function ()...")

- Hit return on the smartphone KB (right arrow).
- Look for the cogwheel button in the bottom right.

Link to post
Share on other sites

25 minutes ago, Biohazard777 said:

You need to completely replace the URL.
- First you open up the website you wish to inspect, for example visit https://linustechtips.com/
- Wait for the site to load.
- Then in the URL input field select everything.
- Paste the code. (thus  "https://linustechtips.com/" becomes "javascript:(function ()...")

- Hit return on the smartphone KB (right arrow).
- Look for the cogwheel button in the bottom right.

Ok but I still don't get where the URL goes. If I just replace it, it google searches for the function. Where do i put the site URL? In the function?Do I have to use some other browser? On what browsers does that work on?

Link to post
Share on other sites

7 minutes ago, stefanmz said:

Ok but I still don't get where the URL goes. If I just replace it, it google searches for the function. Where do i put the site URL? In the function?Do I have to use some other browser? On what browsers does that work on?

Brave, but I just tried and it works on Chrome as well.

Though I did notice that both delete the start of the code when copy pasting:
I paste "javascript:(function () {..." and what actually gets pasted is "(function () {...".
Meaning "javascript:" portion was not pasted.

 

I guess it is a security feature (so that people that aren't tech savvy do not get scammed into pasting malicious code).
In any case if you are manually going to paste the code each time, you will have to manually move the cursor back to the start and add "javascript:"

Hence why I suggest you use the bookmark method, much easier:

 

Link to post
Share on other sites

I don't think fennec (firefox mobile with about:config) has this functionality enabled.  It is listed in the options and the key to activate is F12, so I wonder if that would work with a full keyboard.

 

Here are some great browser extensions to speed up page koads:

 

privacy badger, developed by the EFF, it has a simple menu showing all extra websites in a website, many have upwards of 20 extras, especially online businesses selling products, mostly for tracking you.

 

Most webpages need only one or four max of these websites scripts enabled, included the main website, to use menus and interact the various elements.  Often times, if you are just reading an article, you don't need anything enabled, unless the page is designed to only show the article using some javascript.

 

Another addon is NoScript if you want it to default to not allowing anything, and only allow what is needed.

 

dark reader is nice if you want to change the background color from white to something else during the day, or if you also want to change a dark background to a different color, or change font colors.

: JRE #1914 Siddarth Kara

How bad is e-waste?  Listen to that Joe Rogan episode.

 

"Now you get what you want, but do you want more?
- Bob Marley, Rastaman Vibration album 1976

 

Windows 11 will just force business to "recycle" "obscolete" hardware.  Microsoft definitely isn't bothered by this at all, and seems to want hardware produced just a few years ago to be considered obsolete.  They have also not shown any interest nor has any other company in a similar financial position, to help increase tech recycling whatsoever.  Windows 12 might be cloud-based and be a monthly or yearly fee.

 

Software suggestions


Just get f.lux [Link removed due to forum rules] so your screen isn't bright white at night, a golden orange in place of stark 6500K bluish white.

released in 2008 and still being improved.

 

Dark Reader addon for webpages.  Pick any color you want for both background and text (background and foreground page elements).  Enable the preview mode on desktop for Firefox and Chrome addon, by clicking the dark reader addon settings, Choose dev tools amd click preview mode.

 

NoScript or EFF's privacy badger addons can block many scripts and websites that would load and track you, possibly halving page load time!

 

F-droid is a place to install open-source software for android, Antennapod, RethinkDNS, Fennec which is Firefox with about:config, lots of performance and other changes available, mozilla KB has a huge database of what most of the settings do.  Most software in the repository only requires Android 5 and 6!

 

I recommend firewall apps (blocks apps) and dns filters (redirect all dns requests on android, to your choice of dns, even if overridden).  RethinkDNS is my pick and I set it to use pi-hole, installed inside Ubuntu/Debian, which is inside Virtualbox, until I go to a website, nothing at all connects to any other server.  I also use NextDNS.io to do the same when away from home wi-fi or even cellular!  I can even tether from cellular to any device sharing via wi-fi, and block anything with dns set to NextDNS, regardless if the device allows changing dns.  This style of network filtration is being overridden by software updates on some devices, forcing a backup dns provuder, such as google dns, when built in dns requests are not connecting.  Without a complete firewall setup, dns redirection itself is no longer always effective.

Link to post
Share on other sites

  • 2 weeks later...
On 9/15/2023 at 7:41 PM, Biohazard777 said:

Brave, but I just tried and it works on Chrome as well.

Though I did notice that both delete the start of the code when copy pasting:
I paste "javascript:(function () {..." and what actually gets pasted is "(function () {...".
Meaning "javascript:" portion was not pasted.

 

I guess it is a security feature (so that people that aren't tech savvy do not get scammed into pasting malicious code).
In any case if you are manually going to paste the code each time, you will have to manually move the cursor back to the start and add "javascript:"

Hence why I suggest you use the bookmark method, much easier:

Great,thanks a lot!

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×