Testing for Javascript (marketing-style)
-
This bit of javascript, written by our marketing people, keeps bending my brain the more I try to think about it:
var js_active = 1;
Used in conditionals in various places to determine whether javascript is active or not:if ((js_active == 1) && (username != "")) { ...
-
Reminds me off something I saw...somewhere, probably on this site. IIRC it went a little something like this:
<noscript> alert('We require additional Javascript'); </noscript>
-
@mikeTheLiar said:
Reminds me off something I saw...somewhere, probably on this site. IIRC it went a little something like this:
<noscript> alert('We require
additional Javascriptmore minerals'); </noscript>SCTFY
-
@spinn said:
This bit of javascript, written by our marketing people
Why are marketing people writing javascript? I mean yeah the code is bad, but the bigger WTF is why non-tech people are writing code in your company.
-
@mikeTheLiar said:
Reminds me off something I saw...somewhere, probably on this site. IIRC it went a little something like this:
Needs a slight adjustment:<noscript> alert('We require additional Javascript'); </noscript>
<noscript> <script>alert('We require additional Javascript');</script> </noscript>
-
@joe.edwards said:
@mikeTheLiar said:
Or more plebs.Reminds me off something I saw...somewhere, probably on this site. IIRC it went a little something like this:
<noscript> alert('We require
additional Javascriptmore minerals'); </noscript>SCTFY
-
@locallunatic said:
Why are marketing people writing javascript? I mean yeah the code is bad, but the bigger WTF is why non-tech people are writing code in your company.
Oy...you know, I dropped the original in Sidebar because it was a quick little thing. if I were to get started on answering that question, I'd probably have to mail you the first few volumes of the answer in a year or so.
-
@locallunatic said:
Why marketing people to write the javascript?
a) Because marketing is responsible for the web pages, and javascript is web
b) Only sales people have budget for programming tasks
c) The head of IT runs a strict C# shop, so IT won't do JS
d) All of the above
-
@TGV said:
a) Because marketing is responsible for the web pages, and javascript is web
b) Only sales people have budget for programming tasks
c) The head of IT runs a strict C# shop, so IT won't do JS
d) All of the above
If any of the first three is true then found TRWTF, and if d is then it sounds like workplace violence is needed to protect anyone else from taking a job with the company.
-
@dkf said:
@joe.edwards said:
@mikeTheLiar said:
Or more plebs.Reminds me off something I saw...somewhere, probably on this site. IIRC it went a little something like this:
<noscript> alert('We require
additional Javascriptmore minerals'); </noscript>SCTFY
Or more cowbell.
-
@Ronald said:
@dkf said:
YES!@joe.edwards said:
@mikeTheLiar said:
Or more plebs.Reminds me off something I saw...somewhere, probably on this site. IIRC it went a little something like this:
SCTFY<noscript> alert('We require
additional Javascriptmore minerals'); </noscript>Or more cowbell.
-
@joe.edwards said:
@mikeTheLiar said:
Reminds me off something I saw...somewhere, probably on this site. IIRC it went a little something like this:
<noscript> alert('We require
additional Javascriptmore minerals'); </noscript>SCTFY
YOU MUST CONSTRUCT ADDITIONAL PYLONS
-
@spinn said:
This bit of javascript, written by our marketing people
This concept keeps bending my brain the more I try to think about it.
-
@Ben L. said:
@joe.edwards said:
@mikeTheLiar said:
YOU MUST CONSTRUCT ADDITIONAL PYLONSReminds me off something I saw...somewhere, probably on this site. IIRC it went a little something like this:
SCTFY<noscript> alert('We require
additional Javascriptmore minerals'); </noscript>
-
@locallunatic said:
Probably because of the same reason I'm currently writing in php despite my working in a software department (i.e. C-based.) "Someone in the department knows a bit of it so we won't bother <proper department> with it...."@spinn said:
This bit of javascript, written by our marketing people
Why are marketing people writing javascript?
As it happens, yes, we do have qualified people who know what they're doing when it comes to user interfaces on websites - a whole department of them- and, no, I'm not one of them. Why do you ask?
-
Well, did you at least show them how the code should be fixed?
var js_active = true;
if (js_active && (username != "")) { ...
-
Could be worse. What would you think if you found
if( js_active != 1 )
?
-
@Zecc said:
Well, did you at least show them how the code should be fixed?
var js_active = true;
if (js_active && (username != "")) { ...
Or how about...
if (!js_active) {
//send to page that explains that this site requires javascript
window.location.replace("javascript_is_required.html");
}
else if (username != "") { ...
-
-
if ((pc_on && browser_isRunning && !pc_inBSOD && windows_isBooted && js_active && !armageddon.hasHappened) {...
-
@mott555 said:
if ((pc_on && browser_isRunning && !pc_inBSOD && windows_isBooted && js_active && !armageddon.hasHappened) {...
"Our website doesn't support Linux/Mac."
-
@lolwtf said:
@mott555 said:
if ((pc_on && browser_isRunning && !pc_inBSOD && windows_isBooted && js_active && !armageddon.hasHappened) {...
"Our website doesn't support Linux/Mac."
Filed under: community server blows goats, but if you're on a phone or tablet we'll be happy to redirect you to the front page of our shitty broken mobile site
I wonder what goes through those developers' minds when they decide to redirect their website (which works in mobile browsers because they're not stupid) to a single-page summary of their entire 5000 page website.
-
@mott555 said:
if ((pc_on && browser_isRunning && !pc_inBSOD && windows_isBooted && js_active && !armageddon.hasHappened) {...
Needs an AJAX call to [url="http://www.hasthelhcdestroyedtheearth.com/"]http://www.hasthelhcdestroyedtheearth.com/[/url]