SitePoint Sponsor

User Tag List

Results 1 to 18 of 18
  1. #1
    Gre aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    5,941
    Mentioned
    215 Post(s)
    Tagged
    12 Thread(s)

    This Week in JavaScript - 04 November 2013

    Your weekly update of interesting happenings in the world of JavaScript - feel free to discuss, and help to bring some new ideas to light.

    Here's what we've seen of interest this week.

    What's hot

    Cryptography in the Browser - this is a theme that crops up in the JS forums from time to time. Here's how it's done.

    Offline First: Your Next Progressive Enhancement Technique? - by SitePoint's Craig Buckler

    Techy

    The JavaScript Event Loop: Explained - a look at JS's event-driven interaction model

    A Gentle Introduction to Monads in JavaScript - what they are and why they are useful

    Libraries

    Working with jQuery DataTables - a look at the basics of DataTable, as well as how to use some of the advanced features

    Watching

    Everything You Never Wanted to Know About JavaScript Numbers - a 27 minute talk by Bartek Szopka from JSConf EU

    Frameworks

    What's so special about Google's AngularJS - an interview with Misko Hevery, the founding co-author of AngularJS

    Learn Node.js The Troll Way - an amusing node.js tutorial in which the author constructs a bot to troll his brother on Reddit

    Riot.js — The 1kb client-side MVP framework

    Plain Awesome

    Particle effects in JavaScript - a WebGL demo

    Plain Random

    HTML thinks that "chucknorris" is a colour!
    Seriously! Try this out. What do you get?

    HTML Code:
    <!DOCTYPE HTML>
    <html>
      <head>
        <title>Chuck Norris</title>
      </head>
      
      <body bgcolor="chucknorris">
        <p>Chuck Norris fact: Chuck Norris doesn't call the wrong number. You answer the wrong phone.</p>
      </body>
    </html>
    I know this one isn't much to do with JavaScript, but I found it it too amusing to leave out.
    Extra points for anyone who can explain why this happens (without consulting Google).


    So, what you think about these recent happenings in JavaScript? Let us know and we'll have some more to inspire you next week.

    Also, feel free to PM Paul or PM me if you have anything interesting for the next issue. Happy reading!

  2. #2
    SitePoint Evangelist silver trophybronze trophy
    Join Date
    Jul 2013
    Posts
    406
    Mentioned
    22 Post(s)
    Tagged
    0 Thread(s)
    Or try this one:
    HTML Code:
    <!DOCTYPE HTML>
    <html>
      <head>
        <title>Pullo aus 'm Pott</title>
      </head>
      
      <body bgcolor="pulloausmpott">
        <h3>Pullo fact: I'm not Chuck Norris. You got a better bgcolor.</h3>
      </body>
    </html>
    bgcolor="greenred" is also a beautiful color.
    Not to be confused with bgcolor="redgreen".
    Or bgcolor="blackandwhite"
    Every fantasy name has a fantasy meaning!

    I don't know why. Anyway it's not the doctype html5 + deprecated attribute: html4.1-Transitional and xhtml1.0-Transitional are valid (x)html (*), but give the same effect.
    Also it's not the required but missed <meta> for the charset.
    The html-specs don't say "If an invalid value is given, a User Agent should ...".
    • Note: all browsers seem to do it in the same way.
    • Note: a look in Firebug does not show any value for a background color, though the bgcolor is present!
      But a look in Chrome Developer: body[Attributes Style] {background-color: rgb(192, 0, 0);}
      And IE Developer Toolbar: background-color: #c00000.

    Strange things happen!

    BTW: The "Particle effects in javascript" are other stuff than the mouse following animated gif's of long ago!
    __________
    (*) Valid in the html-validator. - HTML-Tidy is giving alarm.

  3. #3
    Gre aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    5,941
    Mentioned
    215 Post(s)
    Tagged
    12 Thread(s)
    Hey Francky,

    Thanks for the response. That's a nice example.

    As you say, basically anything you type into the bgcolor attribute gives you a value.

    I had quite a lot of fun with this, for example I found out that:

    bgcolor="crap" gives your brown and bgcolor="sick" gives you green.

    Very juvenile

    Anyway, the reason why this is as it is, appears to be a hangover from the Netscape days.
    This article covers it in quite some detail: http://scrappy-do.blogspot.de/2004/0...-internet.html

    And here is the original post on StackOverflow that I was inspired by: http://stackoverflow.com/questions/8...ris-is-a-color

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,200
    Mentioned
    456 Post(s)
    Tagged
    8 Thread(s)
    Why mess around with fake color values, when real ones like these are available?

    bada55
    defec8
    fac0ff
    eff0ff
    d00d00
    deaded
    101ca7
    badbad

  5. #5
    Gre aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    5,941
    Mentioned
    215 Post(s)
    Tagged
    12 Thread(s)
    Fantastic, Ralph!

    eff0ff reminds me of my school days and using a hex calculator to swear at each other.

    Funnily, we never thought of fac0ff. I wonder why.

  6. #6
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,200
    Mentioned
    456 Post(s)
    Tagged
    8 Thread(s)
    Ah yes, the good old calculator! I'm sure at high school the first option would have been some variation of #b000b5

  7. #7
    SitePoint Evangelist silver trophybronze trophy
    Join Date
    Jul 2013
    Posts
    406
    Mentioned
    22 Post(s)
    Tagged
    0 Thread(s)
    20 shades of #b000b5 ?

    BTW: I'm preparing something about the chucknorris phenomenon: in a few days.

  8. #8
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,200
    Mentioned
    456 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by Francky View Post
    I'm preparing something about the chucknorris phenomenon
    "Tell him it's time to #d1e"

  9. #9
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,367
    Mentioned
    180 Post(s)
    Tagged
    6 Thread(s)
    Quote Originally Posted by ralph.m View Post
    No, no, then he #bedead.

  10. #10
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,200
    Mentioned
    456 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by Paul O'B View Post
    No, no, then he #bedead.
    I'd be putting on a #facade if I pretended to care, but I guess his mama would be quite #de5018.

  11. #11
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,367
    Mentioned
    180 Post(s)
    Tagged
    6 Thread(s)
    Quote Originally Posted by ralph.m View Post
    I'd be putting on a #facade if I pretended to care
    You can't #deface chucknorris like that !

  12. #12
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,200
    Mentioned
    456 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by Paul O'B View Post
    You can't #deface chucknorris like that !
    I can do whatever I like, #a5501e.

  13. #13
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,367
    Mentioned
    180 Post(s)
    Tagged
    6 Thread(s)
    Quote Originally Posted by ralph.m View Post
    I can do whatever I like, #a5501e.
    Ok you win

  14. #14
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,200
    Mentioned
    456 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by Paul O'B View Post
    Ok you win
    Aw, you're no fun, #c55cad.

  15. #15
    SitePoint Evangelist silver trophybronze trophy
    Join Date
    Jul 2013
    Posts
    406
    Mentioned
    22 Post(s)
    Tagged
    0 Thread(s)
    But beware of the #5en5e1, he will #c0Eebc (#500NER or #L8TERZ).

  16. #16
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,367
    Mentioned
    180 Post(s)
    Tagged
    6 Thread(s)
    Quote Originally Posted by ralph.m View Post
    Aw, you're no fun, #c55cad.
    You need to start drinking #decaff

  17. #17
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,200
    Mentioned
    456 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by Paul O'B View Post
    You need to start drinking #decaff
    If not real #c0ffee, then it has to be #beeeea

  18. #18
    SitePoint Evangelist silver trophybronze trophy
    Join Date
    Jul 2013
    Posts
    406
    Mentioned
    22 Post(s)
    Tagged
    0 Thread(s)
    Coming back on the chucknorris-background, I couldn't resist to do some experiments.

    The result: some demo pages.
    While the strange background-coloring is a matter of html and css (*), I've made a topic of it in the css department of the forum.
    You can have a look at:



    ______
    (*) Under the hood is some javascript, but only for demo purposes. - Had to find workarounds to get it working in IE of course (IE7/IE10).


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •