Giter VIP home page Giter VIP logo

Comments (5)

le717 avatar le717 commented on August 20, 2024

@thehappycoder No, it is not possible. $.browser.version will bring out the browser version, not the platform version. Would it be possible to support? Yes, it would, as the iOS version is listed in the UA. It would require a new $.browser variable, editing of the regex, and changing under scores to dots for consistency, but none of that is too terribly hard. I could probably do it, but I don't know how to regex yet. :(

from jquery-browser-plugin.

le717 avatar le717 commented on August 20, 2024

@gabceb Would this featured be considering inside the scope of jquery-brower? I just dug through that link I posted above, and iOS has a fairly consistent UA. The iOS version usually comes after CPU OS, then the version number is stated in the form MAJOR_MINOR, with MAJOR_MINOR_PATCH occurring for patch versions and a very few using only MAJOR, followed by like Mac OS X. There are a few that have everything lowercase, so it needs to be a case-insensitive search. There are also a few that follow the same format but inject iPhone, so the format is CPU iPhone OS MAJOR[_MINOR_PATCH] like Mac OS X. And there are still a small few do not follow the format or do not list the iOS version at all (Mozilla/5.0 (iPod; U; CPU like Mac OS X; en) AppleWebKit/420.1 (KHTML, like Gecko) Version/3.0 Mobile/3A101a Safari/419.3, for example).

So while it would be possible to get the iOS version from the UA in most cases thanks to it being rather consistency, I'm not sure if it is something that should be considered for a plugin that detects browser details.

from jquery-browser-plugin.

le717 avatar le717 commented on August 20, 2024

I forgot to add that all other instances of OS occur in the phrase like Mac OS X, so that might make it easier to ensure the iOS version is actually gathered.

from jquery-browser-plugin.

gabceb avatar gabceb commented on August 20, 2024

@le717 send me a PR with the OS information code + test and I will test it out and add it if it works for all major OSs

from jquery-browser-plugin.

le717 avatar le717 commented on August 20, 2024

@gabceb I'll see what I can do. Regex has been a confusion to me (this would be a good time to learn them), and I'm smack in the middle of a big deal with college work, so I may not get this completed any time soon, but I'll try. :)

from jquery-browser-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.