User:Thematrixeatsyou/funjs

From Uncyclopedia, the content-free encyclopedia
Jump to navigation Jump to search

Fun stuff you can to with Javascript. Punch these codes into your address bar.

Images disappear[edit | edit source]

javascript:x=document.getElementsByTagName("img");for(i=0;i<x.length;i++){x[i].style.visibility="hidden";x[i].style.position="absolute";}void(0);

Images disappear when you hover your mouse over them[edit | edit source]

javascript:x=document.getElementsByTagName("img");for(i=0;i<x.length;i++){x[i].onmouseover=function () {this.style.visibility="hidden";this.style.position="absolute";};}void(0);

This one is lots of fun to mess around with. Change "img" to "a" to remove links, and there's some other ones, too.

Delete all the portlets on the page[edit | edit source]

javascript:x=document.getElementsByTagName("div");for(i=0;i<x.length;i++){if(x[i].getAttribute("class")=="portlet"){x[i].style.visibility="hidden";x[i].style.position="absolute"}}alert(v);void(0);

Make images fall down the page[edit | edit source]

javascript:ttype="img";x=document.getElementsByTagName(ttype);for(i=0;i<x.length;i++){x[i].style.position="relative";x[i].style.top="0px";}setInterval("x=document.getElementsByTagName('"+ttype+"');for(i=0;i<x.length;i++){x[i].style.top=(parseInt(x[i].style.top,10)+1)+'px';}",100);void(0);