Most useful Javascript snippet EVER
-
-
Yes. Now I can finally finish that website I've been working on for 30 years!!!
Thank you so much!
-
-
@GoatCheez said:
http://javascriptkit.com/script/cut31.shtml
11 years ago (look at the comments), javascript was all new.
-
The Real WTF (TM) is the copyright notice for all of four lines of code. I can top it though. I was searching for some stuff related to changing the cursor on the page (no, not in an annoying way), and this page was the first result in Google: http://www.java-scripts.net/javascripts/Change-Cursor.phtml
Their copyright notice is about 6 times longer than the actually code, which is only style tags with a single line of CSS.
-
<font size="2">I just love it when there are more comments explaining what you may or may not do with this code than actual code.</font>
<font size="1">Edit: Damn you, drangnslcr! Too fast for me, dammit. ;)</font>
-
@Sunstorm said:
The below script will display whether or not your monitor is on.
Congratulations! Your monitor has passed the is on test!
Nice.
The real WTF here is what's missing:
<font size="2"><noscript>
<p>Sorry, your browser is not JavaScript-ready. You should upgrade to a real browser!</p>
</noscript></font>
-
@Sunstorm said:
The below script will display whether or not your monitor is on.
<FONT face=Tahoma>This is all I see... I'm afraid my monitor failed the test.. :(
<FONT face="Times New Roman">
</FONT></FONT>
-
[quote user="R.Flowers"]
The real WTF here is what's missing:
<font size="2"><noscript>
<p>Sorry, your browser is not JavaScript-ready. You should upgrade to a real browser!</p>
</noscript></font>
[/quote]Yeah, nothing beats an error message like "Your browser refuses to execute my crappy JavaScript code, therefore it's outdated and sucks big time. Please use the one true Internet Explorer and add pieceofhtmlshit.com to your list of trusted sites."
But clueless insults like this do not increase the probability that I'll whitelist that site.
-
{browsertest();}
So whats this then?
An anonymous object instance with a single undefined key, a premature end-of-statement, and an undeclared value?
Dude.
That's not even brillant. That's just brillan.
-
Hey @ammoQ. It's been like 16 years now. How's Javascript going?
-
@SmugTheKiler It died out a few years back.
-
@jinpa said in Most useful Javascript snippet EVER:
@SmugTheKiler It died out a few years back.
So I'm just scamming my employer?
...I'm okay with that.
-
@Dragnslcr. I wonder how they've been.
Not sure why, the name fills me with satisfaction.