Chrome Dev Tools Design Mode
Web pages are just documents your web browser displays. But what if you could type directly on any web page to modify it? You can, and you don't need a browser extension—it's a feature built into every modern browser.
This feature takes advantage of the "document.designMode" feature, which you can enable via your web browser's JavaScript console. It was recently highlighted by Tomek Sułkowski on Twitter, but it's so cool that we have to share it with our readers.
That feeling when you first discovered `document.designMode` pic.twitter.com/bxA1otzCjN
— Tomek Sułkowski (@sulco) September 27, 2019
You could use this feature to clean up a web page before printing it, test how changes to a web page will look, or even just prank people. It'll be just like editing a Word document—no messing with HTML required.
To activate this feature, visit a web page and then open the developer console. To open the console in Google Chrome, click menu > More Tools > Developer Tools or press Ctrl+Shift+i.
While we're using Chrome as an example here, this feature works in other modern browsers, too. Here's how to open the console in other browsers:
- In Mozilla Firefox, click menu > Web Developer > Web Console or press Ctrl+Shift+K.
- In Apple Safari, click Safari > Preferences > Advanced and enable "Show Develop menu in menu bar." Then, click Develop > Show JavaScript Console.
- In Microsoft Edge, click menu > More Tools > Developer Tools or press F12 and then click the "Console" tab.
Click the "Console" tab at the top of the Developer Tools panel. Type the following into the console and press Enter:
document.designMode = 'on'
You can now close the console, if you like, and edit the current web page as if it was an editable document. Click somewhere to insert your cursor and type text. Use the Backspace or Delete keys to remove text, images, and other elements.
This just changes how the web page appears in your browser. As soon as you refresh the page, you'll see the original once again. If you go to another web page or tab, it won't be in design mode until you open the console and type this line once again.
You can even go back into the console and run the following command to turn design mode off:
document.designMode = 'off'
The web page won't be editable anymore, but your changes will be preserved until you next refresh the page.
The above article may contain affiliate links, which help support How-To Geek.
How-To Geek is where you turn when you want experts to explain technology. Since we launched in 2006, our articles have been read more than 1 billion times. Want to know more?
Chrome Dev Tools Design Mode
Source: https://www.howtogeek.com/442634/how-to-edit-any-web-page-right-in-chrome-or-any-browser/
Posted by: daviescritaiment1967.blogspot.com
0 Response to "Chrome Dev Tools Design Mode"
Post a Comment