Mootools: reconociendo el browser

13/Feb/2008 521

La idea de un framework es reordenar un lenguaje y entregarnos herramientas para que sea bastante más fácil nuestro desarrollo. Una de ellas, es el reconocimiento del browser del usuario. En 2monos quise hacer lo mejor de lo mejor, pero lamentablemente IE6 no me acompañó en este camino. En vez de desgastarme tratando de que por lo menos se viera algo decente, o funcione a medias…. preferí abolirlo de una vez por todas. Si entras a 2monos.net utilizando IE6, una ventana te indicará que mejor bajes Firefox. Lamentablemente esta es una acción que por más que lo deseemos no se puede ejecutar en todos los sitios web en que trabajamos, pero en este caso como este sitio es mío, hago lo que quiero y decidí por discriminar un browser que nunca debería haber sido una mayoría.

Para esto, con Mootools es extremadamente fácil. Primero, creamos el evento inicial que gatillará la acción cuando los elementos del HTML (DOM) estén cargados. Luego, una codicional (if/else) que me dirá si el browser es IE6, ejecuta tal acción:

window.addEvent('domready', function(){
     if(window.ie6){
          // haz algo aquí
     }
});

Ver ejemplo

A seguir, una lista de las posibilidades de browsers a ser detectables:

  • window: cualquier browser.
  • window.ie: cualquier Internet Explorer.
  • window.ie6: sólo IE6.
  • window.ie7: sólo IE7.
  • window.gecko: Mozilla Firefox u otro browser que use gecko (Netscape 6+, Flock, Camino, Galeon, Epiphany).
  • window.webkit: Apple Safari u otro que use Webkit (iCab, Konqueror, Omniweb, Shiira, Sunrise).
  • window.webkit419: Apple Safari 2.
  • window.webkit420: Apple Safari 3.
  • window.opera: sólo Opera.

Link

Comentarios

  1. can viagra stop working [#]

    It’s in point of fact a great and helpful piece of information. I’m glad that you just shared this useful info with us.
    Please stay us up to date like this. Thank you for sharing. http://herreramedical.org/viagra

  2. amoxicillin dose ear infection child [#]

    Good article. I will be facing many of these issues as well.. http://antiibioticsland.com/Amoxil.htm

  3. http://t.co/uY2R5aoog7 [#]

    I think everything published was very logical. However, consider this, what
    if you added a little information? I ain’t saying your content isn’t good., however suppose you added something that makes people want more?

    I mean Mootools: reconociendo el browser | CSSLab |
    Laboratorio de ideas web is kinda vanilla. You might look at Yahoo’s home
    page and see how they create post titles to grab people to click.

    You might add a video or a related picture or two to grab readers excited about what you’ve
    got to say. In my opinion, it could bring your website a little livelier.

  4. Gazcheedarap [#]

    cialis 20mg for sale

  5. clomiphene otc [#]

    Quality content is the important to invite the people to pay a
    quick visit the website, that’s what this website is providing. https://buszcentrum.com/clomid.htm

  6. tadalafil tadalafil 40mg [#]

    I was wondering if you ever thought of changing the structure of your site?
    Its very well written; I love what youve got to say. But maybe you could
    a little more in the way of content so people could connect with it better.

    Youve got an awful lot of text for only having one or two images.
    Maybe you could space it out better? http://www.deinformedvoters.org/vidalista-online

  7. apcalis 2.5 mg price [#]

    Thanks for any other wonderful article. The place else may anyone get that kind of information in such an ideal approach of writing?
    I’ve a presentation next week, and I’m on the
    search for such information. http://www.deinformedvoters.org/tadalafil-price

  8. gay filipino dating [#]

    gay dating bahrain https://gay-singles-dating.com/

  9. Gazcheedarap [#]

    cialis tablets uk

  10. stromectol cost [#]

    stromectol 3 mg price Mootools: reconociendo el browser | CSSLab | Laboratorio de ideas web https://ivermectin1.com/ stromectol

  11. MarvinFuh [#]

    how much does viagra cost
    prescription drugs from canada prices how to order viagra from canada cialis from.canada viagra prescription from canada free sample of viagra canadian drug companies cialis without a doctors prescription buying medications in canada canadian levitra candida viagra
    where to buy viagra online buy viagra online at cialis.com canada drugs online mail order viagra

  12. long gay dating games [#]

    kevin huckaby dating gay https://gaydatingcanada.com/

  13. ivermectin1.com [#]

    ivermectin 3mg tablets Mootools: reconociendo el browser | CSSLab | Laboratorio de ideas web https://ivermectin1.com/ stromectol

  14. gay anime boy dating simulator [#]

    gay speed dating stockholm https://datinggayservices.com/

  15. gay bi dating sites [#]

    dating for trans gay guys https://gaydatinglosangeles.com/

  16. Pawan Kalyan Bhagat Singh [#]

    Thanks for sharing, this is a fantastic article post.Thanks Again. Keep writing.

  17. hydroxychloroquine and kidney disease [#]

    Hi, i think that i saw you visited my website thus i came to “return the favor”.I am trying to find things to enhance my website!I
    suppose its ok to use a few of your ideas!! https://hhydroxychloroquine.com/

  18. our quest bars [#]

    This website was… how do you say it? Relevant!!
    Finally I’ve found something which helped
    me. Kudos! quest bars http://bit.ly/3jZgEA2 quest bars

  19. ivermectine [#]

    how much is ivermectin Mootools: reconociendo el browser | CSSLab | Laboratorio de ideas web https://ivermectin1.com/ ivermectin for humans for sale

  20. hydroxychloroquineMt [#]

    hydroxychloroquine buy online hydroxychloroquine over the counter difference between chloroquine phosphate and hydroxychloroquine

  21. white asian gay dating [#]

    is dating site hinge gay https://dating-gaym.com/

  22. app.gumroad.com [#]

    Its like you read my mind! You appear to know so much about
    this, like you wrote the book in it or something.

    I think that you can do with a few pics to drive the message home
    a little bit, but instead of that, this is great blog. A
    great read. I’ll certainly be back. asmr https://app.gumroad.com/asmr2021/p/best-asmr-online asmr

  23. bitly.com [#]

    No matter if some one searches for his vital thing, so he/she wishes to be available that in detail,
    thus that thing is maintained over here. scoliosis surgery https://0401mm.tumblr.com/ scoliosis surgery

  24. HenryUnfiP [#]

    grindr gay dating sites
    gay sex dating game
    gay male dating site pakistan

  25. www.iherb.com [#]

    Hey there just wanted to give you a quick heads up and let you know a few of the images aren’t loading correctly.
    I’m not sure why but I think its a linking issue.
    I’ve tried it in two different browsers and both show
    the same results. quest bars https://www.iherb.com/search?kw=quest%20bars quest bars

  26. j.mp [#]

    Hi mates, how is the whole thing, and what you wish for to say concerning
    this paragraph, in my view its genuinely awesome designed for me.
    cheap flights http://1704milesapart.tumblr.com/ cheap flights

  27. Mobile recharge [#]

    What a beautiful blog

  28. coub.com [#]

    If some one desires to be updated with newest technologies afterward he must be pay a visit this web site and be up to date everyday.
    scoliosis surgery https://coub.com/stories/962966-scoliosis-surgery scoliosis surgery

  29. where to buy tadalafil tablets for humans [#]

    I was more than happy to uncover this site. I wanted to thank you for your time just for this wonderful
    read!! I definitely liked every bit of it and I have you saved as a favorite to check out new
    information in your blog. https://tadalafili.com/

  30. HenryUnfiP [#]

    gay speed dating long beach
    gay dating in michigan
    philippines gay dating

  31. Garcheedarap [#]

    lasix for horses for sale

  32. how does hydroxychloroquine help lupus [#]

    It’s impressive that you are getting thoughts from this article as well as from our dialogue made at this time. http://herreramedical.org/chloroquine

  33. $10 zyrtec coupon [#]

    lytx drivecam – http://allergyd.com

  34. nurtec copay card [#]

    zyrtec 5 mg tablets – https://allergyd.com

  35. benadryl [#]

    cetirizine costco – http://allergyd.com

  36. ivermectin on ebay [#]

    ivermectin pills for scabies

    flag macronutrients song

  37. cheap stromectol [#]

    ivermectin drug interactions

    mount ventricular tachycardia ally

  38. stromectolforte.com [#]

    stromectol 6 mg https://stromectolforte.com/ ivermectin for humans for sale bula ivermectina

  39. isotretinoina [#]

    buy isotretinoine how does accutane work

  40. provigildrug [#]

    modafinil vs adderall adderall vs modafinil

  41. provigilcost [#]

    modafinil pill https://modafinilpleasure.com/

  42. bactrim antibiotic [#]

    bactrim ds side effects dosage trimoxazole ds

  43. GustavoVet [#]

    build my resume for me
    papers for sale

CSSLab