Coding - by tobsta weekly

Day 2,723, 16:43 Published in Australia Slovenia by rakushita

Press CTRL+SHIFT+J and a console will come up to the right of the website you are viewing. Click on the text area and then Copy/Paste these chunks of code in and hit enter to see something cool.

This one allows you to click on and edit paragraphs on the webpage:

var p=document.getElementsByTagName('p');for(var c=0;cp.length;c++){p[c].setAttribute('contenteditable','true')}

This one makes the whole page editable:

var b=document.getElementsByTagName('body');b[0].setAttribute('contenteditable','true');

This one will prompt you asking for something random and then rewrite the page with that random thing:

var ans😛rompt('Something random?','Type here');document.write(ans);

This one will prompt you for something random and populate all paragraphs with the nonsense:

var ans😛rompt('Something random?','Type here'),p=document.getElementsByTagName('p');for(var c=0;cp.length;c++){p[c].innerHTML=ans}

Have fun!