JavaScript WTFs



  • On http://smec.com/:

        <script type="text/javascript">
            function handleError() {
                return true;
            }
            window.onerror = handleError;
        </script>
        <script type="text/javascript" language="javascript">
            function doCallback1(param1, param2, param3) {
                Callback1.Callback(param1, param2, param3);
            }
            function doCallback2(param1, param2, param3) {
                Callback1.Callback(param1, param2, param3);
                Callback2.Callback(param1, param2, param3);
                Callback3.Callback(param1, param2, param3);
            }
            function doCallback3(param1, param2, param3) {
                Callback2.Callback(param1, param2, param3);
                Callback3.Callback(param1, param2, param3);
            }
    
            function InitLocation(division) {
                clbDivision.Callback(division);
            }
        </script>
    

    I'm not sure what's worse - The fact that all JavaScript errors are silently ignored, doCallback2 having three callbacks and doCallback3 having two callbacks, or the use of some global "Callback[123]". Also there's functions called "foo" and "bar" defined in their JavaScript somewhere. Another WTF - When you return true in the window.onerror handler, this prevents the default event handler. This is the opposite to all the other DOM 0 events (such as onclick), where returning false prevents the default handler.

    Also, not JavaScript, but on the same site, large.css is "Medium" and medium.css is "Lagre":

    <link type="text/css" href="/Css/fonts_files/large.css" title="Medium" rel="alternate stylesheet" />
    <link type="text/css" href="/Css/fonts_files/medium.css" title="Lagre" rel="alternate stylesheet" />
    


  • This is grandiosely, almost offensively stupid code.

     Lagre is like English spelling for beer, right?



  • @dhromed said:

    This is grandiosely, almost offensively stupid code.

     Lagre is like English spelling for beer, right?

     

     

    Only if Stella have their way (Cidre)!

     



  • No, the English spelling of beer is ale.



  • No, You are both wrong.  Lager and Ale are types of beer. Beer in English is Beer.



  • @PiisAWheeL said:

    No, You are both wrong.  Lager and Ale are types of beer. Beer in English is Beer.

    I love jokes. I love the wooshing sound they make as they fly by.



  • @PiisAWheeL said:

    No, You are both wrong.  Lager and Ale are types of beer. Beer in English is Beer.

    Correct! Lager is technically a beer brewed at low (cold) temperatures as opposed to room temperature. Ale is technically a beer brewed without using hops for flavouring, though in the past 200 years or so, that usage has gradually faded and nowadays it has come to be used only in compound nouns like 'brown ale' and 'Scotch ale;' but it does still typically describe beers which are less bitter in flavour than the standard 'bitter' beer (as in: 'three pints of bitter, please') sold in almost every English bar. (The nearest Scottish equivalent to 'bitter' is 'heavy,' though 'heavy' is still usually less bitter in flavour than English 'bitter' and again is technically nearer to an ale than a beer.) And yes, I did work in the IT department of a Scottish brewery for many years. :)



  • @Cad Delworth said:

    @PiisAWheeL said:
    No, You are both wrong.  Lager and Ale are types of beer. Beer in English is Beer.
    Correct! Lager is technically a beer brewed at low (cold) temperatures as opposed to room temperature. Ale is technically a beer brewed without using hops for flavouring, though in the past 200 years or so, that usage has gradually faded and nowadays it has come to be used only in compound nouns like 'brown ale' and 'Scotch ale;' but it does still typically describe beers which are less bitter in flavour than the standard 'bitter' beer (as in: 'three pints of bitter, please') sold in almost every English bar. (The nearest Scottish equivalent to 'bitter' is 'heavy,' though 'heavy' is still usually less bitter in flavour than English 'bitter' and again is technically nearer to an ale than a beer.) And yes, I did drink heavily in the IT department of a Scottish brewery for many years. :)

    FTFY



  • @serguey123 said:

    @Cad Delworth said:

    @PiisAWheeL said:
    No, You are both wrong.  Lager and Ale are types of beer. Beer in English is Beer.
    Correct! Lager is technically a beer brewed at low (cold) temperatures as opposed to room temperature. Ale is technically a beer brewed without using hops for flavouring, though in the past 200 years or so, that usage has gradually faded and nowadays it has come to be used only in compound nouns like 'brown ale' and 'Scotch ale;' but it does still typically describe beers which are less bitter in flavour than the standard 'bitter' beer (as in: 'three pints of bitter, please') sold in almost every English bar. (The nearest Scottish equivalent to 'bitter' is 'heavy,' though 'heavy' is still usually less bitter in flavour than English 'bitter' and again is technically nearer to an ale than a beer.) And yes, I did drink heavily in the IT department of a Scottish brewery for many years. :)

    FTFY

    From the guy I was in training with who was from an american brewery, I would assume that is closer to the truth than one would think. (He talked about the beer cart being pushed through the offices on random Fridays in the summer.) I'd have been more jealous if I were a beer drinker.



  • @tweek said:

    @serguey123 said:

    @Cad Delworth said:

    @PiisAWheeL said:
    No, You are both wrong.  Lager and Ale are types of beer. Beer in English is Beer.
    Correct! Lager is technically a beer brewed at low (cold) temperatures as opposed to room temperature. Ale is technically a beer brewed without using hops for flavouring, though in the past 200 years or so, that usage has gradually faded and nowadays it has come to be used only in compound nouns like 'brown ale' and 'Scotch ale;' but it does still typically describe beers which are less bitter in flavour than the standard 'bitter' beer (as in: 'three pints of bitter, please') sold in almost every English bar. (The nearest Scottish equivalent to 'bitter' is 'heavy,' though 'heavy' is still usually less bitter in flavour than English 'bitter' and again is technically nearer to an ale than a beer.) And yes, I did drink heavily in the IT department of a Scottish brewery for many years. :)

    FTFY

    From the guy I was in training with who was from an american brewery, I would assume that is closer to the truth than one would think. (He talked about the beer cart being pushed through the offices on random Fridays in the summer.) I'd have been more jealous if I were a beer drinker.

    IT at a Scottish Brewery? How do you land that job?  You've given me a new life-career goal.


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.