How do I temporarily edit a webpage in Chrome? I want to temporarily edit the webpage displayed in Chrome on my phone, something similar to Chrome desktop's Inspect element feature. I understand this is temporary, but I want to do some tests.

I don't see that option in the application itself, do I need an extension, another app, or is it impossible?
Running the following snippet in the URL bar works in both Chrome for desktop and  Android:

javascript:document.body.contentEditable='true'; document.designMode='on'; void 0


One important note: after copying &amp; pasting the code into the address bar, Chrome automatically strips the javascript: part of it out. You must add that back in or it won't work!

It's to prevent malicious code being run by dumb users who think they'll win an iPad or get +1,000 Facebook friends if they copy some dodgy JS into the address bar.

It has the affect that the whole page becomes editable.

You could then do Print > Save as PDF if you needed to save the edited webpage.



I'm a professional web developer so this definitely has its uses for me. Needless to say, I am not liable if you do something underhanded with this, e.g. falsifying a company's 'thanks, your order is confirmed ' page to defraud products from them with a faked screenshot/print out.

I originally got the code from Stack Overflow, where there are 28 such questions.