Indeed, Crowe stuffed his dog-eared script with various photographs and clippings — everything from advertisements and vintage movie stills to artwork and album covers — each a symbolic source of inspiration. “Vanilla Sky is a pop culture ride,” says Cruise.
The Vanilla JS team maintains every byte of code in the framework and works hard each day to make sure it is small and intuitive. Who's using Vanilla JS? Glad you asked! Here are a few:
In fact, Vanilla JS is already used on more websites than jQuery, Prototype JS, MooTools, YUI, and Google Web Toolkit - combined.
Ready to try Vanilla JS? Choose exactly what you need!
The Vanilla JS team takes pride in the fact that it is the most lightweight framework available anywhere; using our production-quality deployment strategy, your users' browsers will have Vanilla JS loaded into memory before it even requests your site.
To use Vanilla JS, just put the following code anywhere in your application's HTML:
When you're ready to move your application to a production deployment, switch to the much faster method:
That's right - no code at all. Vanilla JS is so popular that browsers have been automatically loading it for over a decade.
Here are a few examples of just how fast Vanilla JS really is:
Code | ops / sec | |
---|---|---|
Vanilla JS | document.getElementById('test-table'); | 12,137,211 |
Dojo | dojo.byId('test-table'); | 5,443,343 |
Prototype JS | $('test-table') | 2,940,734 |
Ext JS | delete Ext.elCache['test-table']; Ext.get('test-table'); | 997,562 |
jQuery | $jq('#test-table'); | 350,557 |
YUI | YAHOO.util.Dom.get('test-table'); | 326,534 |
MooTools | document.id('test-table'); | 78,802 |
Code | ops / sec | |
---|---|---|
Vanilla JS | document.getElementsByTagName('span'); | 8,280,893 |
Prototype JS | Prototype.Selector.select('span', document); | 62,872 |
YUI | YAHOO.util.Dom.getElementsBy(function(){return true;},'span'); | 48,545 |
Ext JS | Ext.query('span'); | 46,915 |
jQuery | $jq('span'); | 19,449 |
Dojo | dojo.query('span'); | 10,335 |
MooTools | Slick.search(document, 'span', new Elements); | 5,457 |
Here are some examples of common tasks in Vanilla JS and other frameworks:
Vanilla JS | var s = document.getElementById('thing').style;s.opacity = 1;(function fade(){(s.opacity-=.1)<0?s.display='none':setTimeout(fade,40)})(); |
---|---|
jQuery | <script src='//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js'></script><script>$('#thing').fadeOut();</script> |
Vanilla JS | var r = new XMLHttpRequest();r.open('POST', 'path/to/api', true);r.onreadystatechange = function () { if (r.readyState != 4 || r.status != 200) return; alert('Success: ' + r.responseText);};r.send('banana=yellow'); |
---|---|
jQuery | <script src='//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js'></script><script>$.ajax({ type: 'POST', url: 'path/to/api', data: 'banana=yellow', success: function (data) { alert('Success: ' + data); },});</script> |
For more information about Vanilla JS:
When powering your applications with Vanilla JS, feel free to use this handy button!
The Abridged Script
written by
Movie:
February 10, 2002
The Editing Room
https://the-editing-room.com/s#kbnzg
FADE IN:
INT. TOM CRUISE'S FANCY FUCKING APARTMENT.
TOM CRUISE gets up and walks through his ridiculously expensive apartment. We instantly HATE him.
CAMERON DIAZ
(in Tom's bed)
Wow, Tom, I really enjoyed all of that wild monkey sex we had last night. There's nothing I, Cameron Diaz, like more than drinking your cum and riding your cock into the sunset.
We all despise him further, wishing for something AWFUL to happen to him.
TOM CRUISE
I like it when you ride me too, but I don't appreciate you much at all, nor do I have any respect for you or our delicate situation. In fact, I'm constantly womanizing and referring to you as a stalker, even though, if you were any sort of stalker, I'd be largely at fault due to my continually fucking you.
We suddenly desire nothing more in the world for TOM CRUISE to be cloned, then have the original TOM CRUISE sliced into a thousand pieces and force-fed to the TOM CRUISE clone on a plate of TOM CRUISE and C4, which is then detonated when he is finished. Instead, however, TOM CRUISE goes to work.
TOM CRUISE
I own 51% of my father's company. Everyone hates me because I'm disgustingly rich and treat the entire company and the lives of my employees like toys.
JASON LEE
You have everything, Tom, and I have nothing. I say I'm your friend, but you treat me like shit. For example, meet Penelope Cruz, whom I seem to have some kind of crush on. Then steal her from me with your grown up appearance.
PENELOPE CRUZ
I'm playing the same part I played in the spanish thriller 'Open Your Eyes', of which this film is a terribly manipulative remake. Also, I am so sickeningly perky and empty-headed that it kind of makes you want to die, doesn't it?
TOM CRUISE
I'm instantly in love with you. Truly, only you can Open My Eyes.
PENELOPE CRUZ
Open Your Eyes.
TOM CRUISE
Open My Eyes.
AUDIENCE
(falling asleep)
I'm having trouble with that, myself...
TOM CRUISE and PENELOPE CRUZ really hit it off, as evidenced by virtually NOTHING.
TOM CRUISE
I'm madly in love with you, Penelope, but not as in love as I am with myself. Actually, that's why I like you, your last name has me partly convinced you're me.
PENELOPE CRUZ
I'm sorry, I didn't hear you, I was busy writing my own name and drawing big stars all around it.
TOM CRUISE leaves to get in his EXPENSIVE CAR.
CAMERON DIAZ
Well, well, well. Tom Cruise. I thought I might find you here, in this self-important movie, since those are the only kinds of movies you do. I followed you and sat outside all night, waiting for you to come back out. Now get in my car, against all decent judgement.
TOM CRUISE
That would probably be the second stupidest thing I could possibly ever do.
CAMERON DIAZ
What's the stupidest?
TOM CRUISE
Are you familiar with the work of L. Ron Hubbard? Let me explain..
He gets in the car.
CAMERON DIAZ
So, uh, I'm pretty pissed about this whole you having sex with other people thing. I kind of love you. I mean, I come over all the time and we have sex.
(awkwardly)
I swallow your cum.
TOM CRUISE
You're a crazy bitch!
AUDIENCE
What? She's being pretty reasonable. What the hell did you expect, Tom?
DIRECTOR CAMERON CROWE
Wait, no, that's not how you're supposed to feel.
CAMERON DIAZ
When you make love to someone, your body makes a promise whether you do or not.
AUDIENCE
What the fuck? What kind of psycho talks like that? She's crazy!
CAMERON DIAZ
Actually, everyone in this movie seems to randomly spout lines that belong in bad poems.
AUDIENCE
Booo! We don't like you as much as we like Penelope Cruz, because she is an unsettlingly chipper munchkin incapable of basic thought.
Annoyed, CAMERON DIAZ drives her car off a BRIDGE and DIES.
TOM CRUISE
Someone who I've always considered a friend is dead. More tragic, however, my face is disfigured.
AUDIENCE
YES! That's what you fucking get, you typecast egomaniac!
TOM CRUISE
Feel awful for me, my life is destroyed, and just when I finally found a woman who I can care about a little more than I care about the countless other women I fuck! I'll just pay for reconstructive surgery with my endless supply of money. Do you feel bad yet?
AUDIENCE
No.
DIRECTOR CAMERON CROWE
Then perhaps you will feel confused instead!
Suddenly, TOM CRUISE is in jail for MURDER. He is telling a story to KURT RUSSEL via flashbacks. This story is about how he survived his wreck and continued seeing PENELOPE CRUZ for a while, until she turned into CAMERON DIAZ, at which point he KILLED HER. Nothing at all makes any sense, and this continues for a long, long time. Eventually TOM CRUISE finds his confused, disfigured self in an elevator with a CREEPY LOOKING GUY.
TOM CRUISE
I'm so confused! My face keeps switching between being better and being disfigured. All of these confusing elements must be leading toward some extremely clever explanation that ties all of them together!
CREEPY LOOKING GUY
Actually, if you'll allow me to spend thirty minutes spouting tremendous amounts of boring dialogue, you'll understand.. You see, you're dreaming. After an arbitrary point in the film, you came to me and made me freeze you and give you a Lucid Dream, which you fucked up and made absurdly confusing.
TOM CRUISE
So all of the potentially interesting twists and weird events culminate in the explanation that they didn't happen in the first place.
CREEPY LOOKING GUY
Neat, huh?
TOM CRUISE
That's the stupidest fucking thing I've ever heard.
CREEPY LOOKING GUY
Wait till you get a load of your lines in a few minutes. What's really fantastic is all of this confusion exists solely to give you the satisfaction of no longer being confused once I'm done speaking. This movie makes no real point or statement, nor does it even drive toward some kind of purpose - the point is to confuse you and then explain that it doesn't have to make sense, since it's all fake anyway. We're basically bashing everyone's head into a brick wall and expecting them to thank us when we finally stop.
AUDIENCE
I feel like I just spent a week putting together a five thousand piece jigsaw puzzle to find that it's that damn picture from www.goatse.cx.
CREEPY LOOKING GUY
Now, Tom, you must make an important decision. Will you decide to continue living in what has been painted as an awful, hellish, confusing nightmare or will you wake up and cope with a reality for which you are entirely unequipped?
TOM CRUISE
Oh shit, I can't make decisions. I mean, I left Nicole Kidman.
(looking at bracelet)
What Would L. Ron Hubbard Do?
L. RON HUBBARD'S CORPSE
Ummm, I'd give L. Ron Hubbard's estate some more money.
TOM CRUISE
Thy will be done.
END