JavaScript hack

Go to google.com clear out your address bar and paste in this 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.images; 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; DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5}R++}setInterval('A()',5); void(0); hit enter z0mg 100k views! And for you guys who say this isn't hacking: your absolutely right. Which is why I put in the whole "1337 hacking skillz" as a form of parody and for laughs(I was joking). This video was made as a means to show those who don't understand scripting the kind of fun you can have with it. Calling me names and insulting me doesn't make you look any smarter and just shows some of the jackasses that are out there. For those that have left nice comments I thank you and I hope you found this enjoyable.

Relatd javascript Articles

Prototype Graphic Framework

Sebastien Gruhier has created useful libraries such as the Prototype Windowcomponent.

Now, he has created the Prototype Graphic Framework(PGF) - a framework based on prototype to display vectorial shapes inside a web browser.

The framework has various renderers that sit on top of SVG, Canvas, and VML, so you can plug and play (although canvas support is limited right now).

PLAIN TEXT
JAVASCRIPT:
  1. // Create an SVG renderer
  2. varrenderer = newSVGRenderer ("whiteboard");
  3. // Create a rectangle with some attributes like color and bounds
  4. varrect = newGraphic. Rectangle(renderer);
  5. rect.setFill({r: 255, g: 0, b: 0, a: 128});
  6. rect.setStroke({r: 255, g: 255, b: 0, a: 128, w: 5});
  7. rect.setBounds(10, 20, 200, 300);
  8. rect.setRoundCorner(10, 10);
  9. rect.translate(10, 20);
  10. rect.rotate(30);
  11. renderer.add(rect);
Create cross browser vector graphics with Dojo

Dylan Schiemann, co-creator of the Dojo toolkit, has written a broad piece on creating cross browser vector graphics with Dojo.

The article delves into the new dojo.gfxlibrary that abstracts the slight mess of SVG vs. Canvas vs. VML.

One of the examples in the article discusses drawing a clock with this snippet that shows drawing the clock hands, along with their shadows:

PLAIN TEXT
JAVASCRIPT:
  1. this.shadows.hour.shadow= this._initPoly(this.surface, hP)
  2. . setFill([0, 0, 0, 0.1]);
  3. this.hands.hour= this._initPoly(this.surface, hP)
  4. . setStroke({color: this.handStroke, width:1 })
  5. . setFill({
  6. type: "linear",
  7. x1: 0, y1:0, x2:0, y2:-27,
  8. colors: [{offset:0, color:"#fff"}, {offset:0.33, color:this.handColor}]
  9. });
  10. this.shadows.minute.shadow= this._initPoly(this.surface, mP)
  11. . setFill([0, 0, 0, 0.1]);
  12. this.hands.minute= this._initPoly(this.surface, mP)
  13. . setStroke({color: this.handStroke, width:1 })
  14. . setFill({
  15. type: "linear",
  16. x1: 0, y1:0, x2:0, y2:-38,
  17. colors: [{offset:0, color:"#fff"}, {offset:0.33, color:this.handColor}]
  18. });

What features are supported

  • Strokes (borders)
  • Fills
  • Shapes and Paths
  • Opacity
  • Linear Transformations
  • Rounded Corners

If you have wanted "the ability to draw and modify non-rectangular, browser-native shapes" then check out the article and dig deeper:

Related javascript Projects

JSLint

JSLint is a JavaScript program that looks for problems in JavaScript programs.

ErlyJS

ErlyJS is a Javascript compiler running on and compiling for the Erlang virtual machine.

jQuery
jQuery is a fast, concise, JavaScript Library that simplifies how you traverse HTML documents, handle events, perform animations, and add Ajax interactions to your web pages. jQuery is designed to change the way that you write JavaScript.
MooTools
MooTools is a compact, modular, Object-Oriented JavaScript framework designed for the intermediate to advanced JavaScript developer. It allows you to write powerful, flexible, and cross-browser code with its elegant, well documented, and coherent API.
Er.js
Er.js piggybacks on Neil Mix’s Thread.js which fakes threading in JavaScript 1.7 using coroutines and nested generator continuations. The goal is to replicate Erlang’s concurrent lockless process model and message-passing APIs in JavaScript.