1. #1
    Sencha User
    Join Date
    Jun 2011
    Posts
    18
    Vote Rating
    0
    tr1x is on a distinguished road

      0  

    Default Answered: Detecting if isWebkit Browser or supports sencha touch

    Answered: Detecting if isWebkit Browser or supports sencha touch


    Hallo,

    how can i detect if the Browser supports "Sencha Touch 1.1" (WebKit).
    In "Sencha Touch 2.0" you can do:

    Code:
    if(Ext.browser.is.WebKit){// WebKit specific code here}
    Is there a way to do that in Sencha Touch 1.1?

    Thanks!

  2. Hi tr1x.
    Actually in Touch 1, there is no browser check function available.
    However, you can use the Ext.is and Ext.supports singleton classes to check if your browser capabilities, or, even better, you can apply a regex to the "userAgent" property of "navigator" object.

    This property on webkit desktop browser should be something like:

    Code:
    Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.51.22 (KHTML, like Gecko) Version/5.1.1 Safari/534.51.22
    Hope this helps.

  3. #2
    Sencha User
    Join Date
    Jun 2011
    Posts
    18
    Vote Rating
    0
    tr1x is on a distinguished road

      0  

    Default dirty solution

    dirty solution


    What about this litle solution

    Code:
    if(!Ext.is.Android && !Ext.is.Blackberry && !Ext.is.iOS){
        //do some stuff
    }

  4. #3
    Sencha - Services Team AndreaCammarata's Avatar
    Join Date
    Jun 2009
    Posts
    1,394
    Answers
    148
    Vote Rating
    22
    AndreaCammarata has a spectacular aura about AndreaCammarata has a spectacular aura about

      0  

    Default


    Hi tr1x.
    Actually in Touch 1, there is no browser check function available.
    However, you can use the Ext.is and Ext.supports singleton classes to check if your browser capabilities, or, even better, you can apply a regex to the "userAgent" property of "navigator" object.

    This property on webkit desktop browser should be something like:

    Code:
    Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.51.22 (KHTML, like Gecko) Version/5.1.1 Safari/534.51.22
    Hope this helps.
    Sencha Inc
    Andrea Cammarata, Solutions Engineer
    CEO at SIMACS

    @AndreaCammarata
    www.andreacammarata.com
    github: https://github.com/AndreaCammarata

    TUX components bundle for Sencha Touch 2.x.x
    http://www.tux-components.com/


  5. #4
    Sencha User
    Join Date
    Jun 2011
    Posts
    18
    Vote Rating
    0
    tr1x is on a distinguished road

      0  

    Default thx

    thx


    hey thx for the tip.

    this is my final solution:

    Code:
    if((/(WebKit)/i).test(navigator.userAgent) == false){
        //do some cool stuff
    }

  6. #5
    Sencha - Services Team AndreaCammarata's Avatar
    Join Date
    Jun 2009
    Posts
    1,394
    Answers
    148
    Vote Rating
    22
    AndreaCammarata has a spectacular aura about AndreaCammarata has a spectacular aura about

      0  

    Default


    You are welcome
    Sencha Inc
    Andrea Cammarata, Solutions Engineer
    CEO at SIMACS

    @AndreaCammarata
    www.andreacammarata.com
    github: https://github.com/AndreaCammarata

    TUX components bundle for Sencha Touch 2.x.x
    http://www.tux-components.com/


Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi