# smart-app-banner

> Smart banner for Android or iOS

Latest version **2.0.0** (published 2018-11-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install smart-app-banner
pnpm add smart-app-banner
yarn add smart-app-banner
bun add smart-app-banner
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2018-11-09 |
| First published | 2015-02-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 56.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 521 |
| Author | Vitaly Glibin |
| Maintainers | alyndin, dfcreative, everyonesdesign, gableroux, joernroeder, nevel |
| Keywords | smart, banner, smartbanner, android, iphone, application |

## Links

- npm: https://www.npmjs.com/package/smart-app-banner
- Repository: https://github.com/kudago/smart-app-banner
- Issues: https://github.com/kudago/smart-app-banner/issues
- npm.io page: https://npm.io/package/smart-app-banner

## Dependencies (5)

- [get-doc](https://npm.io/package/get-doc.md) ^1.0.4
- [ua-parser-js](https://npm.io/package/ua-parser-js.md) ^0.7.18
- [cookie-cutter](https://npm.io/package/cookie-cutter.md) ^0.2.0
- [object-assign](https://npm.io/package/object-assign.md) ^4.1.1
- [component-query](https://npm.io/package/component-query.md) 0.0.3

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2018-11-09
- 1.5.1 — 2018-06-12
- 1.5.0 — 2018-06-11
- 1.4.0 — 2017-09-13
- 1.3.1 — 2016-11-08
- 1.3.0 — 2016-07-06
- 1.2.0 — 2016-07-06
- 1.1.5 — 2016-03-10
- 1.1.4 — 2016-02-19
- 1.1.3 — 2015-07-23
- 1.1.2 — 2015-07-16
- 1.1.1 — 2015-03-03
- 1.1.0 — 2015-03-03
- 1.0.4 — 2015-02-05
- 1.0.3 — 2015-02-05
- … 3 more at https://npm.io/package/smart-app-banner/versions

## README

Smart App Banner
================

Lightweight smart app banner with no jQuery (or any other framework) requirement.

Based on 'jQuery Smart Banner' by Arnold Daniels <arnold@jasny.net> https://github.com/jasny/jquery.smartbanner

## Difference

* Standalone (no frameworks required)
* Different icons/price for iOS and Android
* Available as npm-module

## Installation

`$ npm install --save smart-app-banner`


## Usage

```html
<html>
  <head>
    <title>MyPage</title>

    <meta name="apple-itunes-app" content="app-id=502838820">
    <meta name="google-play-app" content="app-id=ru.hh.android">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <link rel="stylesheet" href="node_modules/smart-app-banner/dist/smart-app-banner.css" type="text/css" media="screen">
    <link rel="apple-touch-icon" href="apple-touch-icon.png">
    <link rel="android-touch-icon" href="android-icon.png" />
  </head>
  <body>
    ...
    <script src="node_modules/smart-app-banner/dist/smart-app-banner.js"></script>
    <script type="text/javascript">
      new SmartBanner({
          daysHidden: 15,   // days to hide banner after close button is clicked (defaults to 15)
          daysReminder: 90, // days to hide banner after "VIEW" button is clicked (defaults to 90)
          appStoreLanguage: 'us', // language code for the App Store (defaults to user's browser language)
          title: 'MyPage',
          author: 'MyCompany LLC',
          button: 'VIEW',
          store: {
              ios: 'On the App Store',
              android: 'In Google Play',
              windows: 'In Windows store'
          },
          price: {
              ios: 'FREE',
              android: 'FREE',
              windows: 'FREE'
          }
          // , theme: '' // put platform type ('ios', 'android', etc.) here to force single theme on all device
          // , icon: '' // full path to icon image if not using website icon image
          // , force: 'ios' // Uncomment for platform emulation
      });
    </script>
  </body>
</html>
```

## Development

The following commands are available for compiling the project:

| Command | Result |
| ------- | ------ |
| `npm install` | Installs the required dependencies |
| `npm run build` | Builds the application JavaScript. |

## See also

* [smartappbanner.js](https://github.com/ain/smartbanner.js) an alternative smart app banner.

---
_Source: https://npm.io/package/smart-app-banner · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
