You are not logged in.

  • »imvucodes« is a verified user
  • "imvucodes" started this thread

Posts: 130

Location: Interwebs

Occupation: Serving code snippets non stop.

  • Send private message

1

Monday, July 12th 2010, 2:36pm

Right Click Shaking

This will make the window shaking when the user hits the right mouse button. The shake effect may work for IE users only. You can modify the msgtext using the customize tool.

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<script type="text/javascript">
var copiedfrom='www.imvucodes.net';
var msgtext='Shake it, baby!';
function shakewindow() {
	var x=10
	if (document.all||document.layers) {
		for (i=0;i,i<20;i++){
			window.moveBy(0,x)
			window.moveBy(x,0)
			window.moveBy(0,-x)
			window.moveBy(-x,0)
		}
	}
	alert(msgtext);
	return false;
}
document.oncontextmenu=shakewindow;
</script>

Rate this thread