GithubHelp home page GithubHelp logo

modernizr-whatsapp's Introduction

Modernizr WhatsApp

A simple Modernizr test for checking whether the visitor's OS has support for WhatsApp.

Why?

This test was created to be able to show a WhatsApp social sharing button only on those devices that support WhatsApp. Responsive design isn't enough to accomplish this. A small screen doesn't necessarily indicate a smartphone; it can just as well be a small desktop screen, or a phone that can't run WhatsApp. Enter Modernizr. This test sniffs the user agent and checks it against a pre-defined list of operating systems that support WhatsApp.

Try it

Open the test page on your favourite device and see if it works.

Contribute

If you find a flaw in the test's outcome, feel free to send in a pull request.

Acknowledgements

  • Feature detection would be preferable to user agent sniffing, but that's impossible in this case.
  • The test was created in a few minutes and therefore isn't conclusive. However, it should be enough to cover 95% of all cases.
  • WhatsApp doesn't work on Android tablets, but this test doesn't exclude those devices.
  • The Android check doesn't yet take the version into account (Android OS 2.1 and above).

modernizr-whatsapp's People

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

asifurrouf

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.