npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

angular-add-to-home-screen

v0.2.0

Published

An AngularJS directive to display an "add to homescreen" dialog for iOS 7 and iOS 6

Downloads

24

Readme

angular-add-to-home-screen Build Status

An AngularJS directive to display an "add to homescreen" dialog for iOS 7 and iOS 6.

Try it out (hint: your user agent needs to identify as an iOS device).

iOS7 iOS6

Installation

bower

bower install angular-add-to-home-screen

Manually

Hop on over to the releases page and grab angular-add-to-homescreen.js and aaths.css

or download the source code and use the files in the dist/ folder

Setup

  1. Grab dist/angular-add-to-home-screen.js and include it in your javascript payload
  2. Import the module as a dependency
angular.module('myApp', ['angularAddToHomeScreen']);
  1. Include the classes from styles/aaths.css in your app's CSS :cool:

Examples

Basic

Will show a dialog with the proper icons for the platform

<div ng-add-to-homescreen></div>

CSS API

This plugin does not style anything for you. It is completely up to you to style the dialog in whatever way makes sense for your application. However, this is a fully styled example in the example/ directory. Check out example.css. Feel free to just copy the styles into your project.

div.aaths-container
  a.aaths-close // close button
  div.aaths-instructions
    span.aaths-iOS6-icon // "share" icon if iOS6
    span.aaths-iOS7-icon // "share" icon if iOS7

why?

If you are using this script you might want to make a modal window pop up with the instructions, or you might want to make one of those trendy app banners up top. I don't discriminate, use this to do the hard stuff and you can style it however you want.

Contributing

Issues and pull requests greatly appreciated. Please be on the lookout for:

  • outdated User Agent strings
  • tests failing
  • improve testing

Todo

  • Add to homescreen for Android Chrome

License

MIT