Top 3 Perfect Computer Pranks to Freak out your Co-Worker

POSTED BY , UPDATED ON October 12th, 2019

perfect computer pranks for office

Nothing builds team spirit better than pulling a good prank…well, at least for everyone except the victim. And honestly, with the three computer pranks I’m going to show you today, even the victims are going to be more amazed than upset. To accomplish these, you need to know the habits of your co-workers: when they tend to leave their cubicles and how long their cubicles will be left unattended and therefore prone to attack.

The fundamentals of pulling off these three perfect computer pranks are all the same. You’re going to paste a snipped of Javascript into your victim’s web browser, hit enter and then hightail it back to your cubicle or wherever you can get a good view of the ensuing antics.

 

1. Bounce. It’s Not Just a Fabric Softener Anymore!

Do you ever watch Dancing With The Stars ? Sooner or later they have to do the Jive, where they’re required to bounce all around the dance floor to cool ’50s swing music. This piece of Javascript will have your victim’s browser window bouncing all over the desktop like it’s dancing the Jive. Here’s the code you need to copy and paste:

javascript:function Shw(n) {if (self.moveBy) {for (i = 35; i > 0; i–) {for (j = n; j > 0; j–) {self.moveBy(1,i);self.moveBy(i,0);self.moveBy(0,-i);self.moveBy(-i,0); } } }} Shw(6)-accident

Take this code into your cubicle and test it out. And here’s an important tip that applies to all of these pranks: Try them first on your computer using the same web browser that your victim uses. Also, be sensitive to tabbed browsing; these computer pranks might not work if other tabs are open.

Now, with this one specifically, you can make the effect last longer by changing the “35” to a larger number. Edit it to “600” and the browser window will bounce around for one minute.

 

2. The Slythy Toves do Gyre and Gymble

How about a prank that will make all the photos on a web page slither around the browser window like a snake making a hasty getaway from a guy wielding a garden hoe? It’s a very cool, and disconcerting, effect. All you need is an empty cubicle and this code:

javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.getElementsByTagName(“img”); DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position=’absolute’; DIS.left=(Math.sin(R*x1+i*x2+x3)*x4+x5)+”px”; DIS.top=(Math.cos(R*y1+i*y2+y3)*y4+y5)+”px”}R++}setInterval(‘A()’,5); void(0);

 

3. Your (Victim’s) Name Here

I’ve been told that you can’t believe everything you read on the Internet. Really? Then how can they print it? This line of code allows you to take cyber world misinformation to a whole new level. Copy and paste this into an untended browser window in a nearby cubicle and it instantly makes the web page text in the window editable.

A headline at Weather.com that reads “San Antonio is Hot Today” could be edited to read Jane Doe is Hot Today. Be creative.

Alternately you could make yourself famous/infamous (choose one) by inserting your name onto a webpage, taking a screen shot, printing it out and posting it on the wall of your cubicle or the lunchroom. It doesn’t require much code:

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

 

How you use these is, of course, up to you, and you must be prepared to accept the consequences if any of your victims are the kind of guys who don’t just like to get even, but prefer to get a little ahead.