javascript code to edit webpage 1

javascript code to edit webpage

//Paste this in the "console" tab of the Inspect window  
//with this you temporarily edit text of a webpage on your end

javascript:document.body.contentEditable = true; void 0;

Here is what the above code is Doing:
1. The first line is a comment. It’s ignored by the browser.
2. The second line is a bookmarklet. It’s a JavaScript program that runs in the context of the current page.
3. The third line is a comment. It’s ignored by the browser.

The JavaScript program is:

document.body.contentEditable = true;
void 0;

The first line makes the entire page editable. The second line is a no-op. It’s there to prevent the browser from displaying the value of the first line.

To use the bookmarklet, copy it to the clipboard. Then create a new bookmark in your browser. Paste the bookmarklet into the URL field.

Now you can edit any page.

Similar Posts