Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

yotta / pictogram

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 60
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Settings
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Closed
Open
Issue #37 opened Mar 02, 2017 by Arturo Montejo Ráez@amontejo 
  • New issue
New issue

Detectar navegador usado y advertir de compatibilidad

El código javascript que permite detectar el navegador es el siguiente:

sayswho = (function(){
    var ua= navigator.userAgent, tem,
    M= ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || [];
    if(/trident/i.test(M[1])){
        tem=  /\brv[ :]+(\d+)/g.exec(ua) || [];
        return 'IE '+(tem[1] || '');
    }
    if(M[1]=== 'Chrome'){
        tem= ua.match(/\b(OPR|Edge)\/(\d+)/);
        if(tem!= null) return tem.slice(1).join(' ').replace('OPR', 'Opera');
    }
    M= M[2]? [M[1], M[2]]: [navigator.appName, navigator.appVersion, '-?'];
    if((tem= ua.match(/version\/(\d+)/i))!= null) M.splice(1, 1, tem[1]);
    return M.join(' ');
})();

De tal forma que saywho() nos devuelve un string que será "IE 11", "Firefox 52" o "Chrome 51", por ejemplo.

Este debería hacerse en el login, y si no se obtiene un navegador válido (Firefox >= 52 o Chrome >= 51) dar un mensaje aconsejando actualizar (con enlaces a las descargas de ambos navegadores).

  • Arturo Montejo Ráez @amontejo

    changed milestone to Sprint 10

    Mar 06, 2017

    changed milestone to Sprint 10

    changed milestone to %3
    Toggle commit list
  • Sebastián Collado Montañez @scollado

    mentioned in commit 35b0f9f0

    Mar 06, 2017

    mentioned in commit 35b0f9f0

    mentioned in commit 35b0f9f0ef900d157b97eb90d9323ba10bb7653c
    Toggle commit list
  • Sebastián Collado Montañez @scollado

    mentioned in commit 6ad31911

    Mar 06, 2017

    mentioned in commit 6ad31911

    mentioned in commit 6ad31911a4ed1784b4d34a40a5cc72a7a4ea5aa5
    Toggle commit list
  • Sebastián Collado Montañez @scollado

    mentioned in commit d711097c

    Mar 07, 2017

    mentioned in commit d711097c

    mentioned in commit d711097c511bda725ed4b14b03f25603ff9a1010
    Toggle commit list
  • Sebastián Collado Montañez @scollado

    mentioned in commit dec4fbee

    Mar 07, 2017

    mentioned in commit dec4fbee

    mentioned in commit dec4fbee40576a6f601a09402ce14577950239ff
    Toggle commit list
  • Sebastián Collado Montañez @scollado

    mentioned in commit edb19a11

    Mar 08, 2017

    mentioned in commit edb19a11

    mentioned in commit edb19a1154f75d9b8840554c078c53fc36d40a3c
    Toggle commit list
  • Sebastián Collado Montañez @scollado commented Mar 09, 2017
    Developer

    Chrome: 45+ Firefox: 25+ Opera: 35+ Safari: NULL (probado 5.1) Explorer: NULL (probado 11)

    Pruebas realizadas en (www.browserling.com)

    Edited Mar 09, 2017 by Sebastián Collado Montañez
    Chrome: 45+ Firefox: 25+ Opera: 35+ Safari: NULL (probado 5.1) Explorer: NULL (probado 11) Pruebas realizadas en (www.browserling.com)
  • Sebastián Collado Montañez @scollado

    mentioned in commit a287cfd3

    Mar 09, 2017

    mentioned in commit a287cfd3

    mentioned in commit a287cfd3f037a0fa3d8d7ea4028746a70f7139a6
    Toggle commit list
  • Sebastián Collado Montañez @scollado commented Mar 09, 2017
    Developer

    TODO: Traducción de cadenas.

    TODO: Traducción de cadenas.
  • Sebastián Collado Montañez @scollado

    mentioned in commit ce7796aa

    Mar 10, 2017

    mentioned in commit ce7796aa

    mentioned in commit ce7796aaac1e8e8b65fc8b02a62f632870192f2b
    Toggle commit list
  • Sebastián Collado Montañez @scollado commented Mar 10, 2017
    Developer

    Versión en español e inglés disponible

    Versión en español e inglés disponible
  • Sebastián Collado Montañez @scollado

    closed

    Mar 10, 2017

    closed

    closed
    Toggle commit list
  • Write
  • Preview
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment
Assignee
Assign to
Sprint 10
Milestone
Sprint 10
Assign milestone
Time tracking
None
Due date
No due date
2
Labels
AngularJS improvement
Assign labels
  • View labels
2
2 participants
Reference: yotta/pictogram#37