Add website shortcut to home screen on mobile by javascript

No implement yet.

manifest.json example:

{
 "short_name": "momo購物網手機版",
 "name": "momo購物網手機版",
 "gcm_sender_id":"103953800507",
 "icons": [
   {
    "src": "/img/momo48.png",
    "type": "image/png",
    "sizes": "48x48"
   },
   {
    "src": "/img/momo96.png",
    "type": "image/png",
    "sizes": "96x96"
   },
   {
    "src": "/img/momo144.png",
    "type": "image/png",
    "sizes": "144x144"
   },
   {
    "src": "/img/momo192.png",
    "type": "image/png",
    "sizes": "192x192"
   },
   {
    "src": "/img/momo256.png",
    "type": "image/png",
    "sizes": "256x256"
   },
   {
    "src": "/img/momo512.png",
    "type": "image/png",
    "sizes": "512x512"
   }
 ],
 "background_color": "#E40580",
 "theme_color": "#E40580",
 "display": "standalone",
 "start_url": "/main.momo?addhome=1"
}

Reference:

  1. https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Add_to_home_screen#How_do_you_use_it
  2. https://stackoverflow.com/questions/6162070/jquery-mobile-add-the-home-screen-options
  3. https://github.com/cubiq/add-to-homescreen