项目作者: islemaster

项目描述 :
Dynamically set a colored status icon in the browser tab
高级语言: JavaScript
项目地址: git://github.com/islemaster/set-tab-status-icon.git
创建时间: 2017-02-22T22:47:48Z
项目社区:https://github.com/islemaster/set-tab-status-icon

开源协议:MIT License

下载


set-tab-status-icon

Travis CI

A single function that will change the current page’s favicon (displayed in the tab bar) to a simple colored status icon, on demand.

status icon preview

Install

This package is published on npm.

  1. > npm install --save set-tab-status-icon

Then:

  1. import setTabStatusIcon from 'set-tab-status-icon';
  2. setTabStatusIcon('pass');

Or you can just include index.js and the setTabStatusIcon function will be available on window.

Usage

  1. setTabStatusIcon('not-started'); // Gray icon
  2. setTabStatusIcon('in-progress'); // Blue icon
  3. setTabStatusIcon('pass'); // Green icon
  4. setTabStatusIcon('fail'); // Red icon
  5. setTabStatusIcon('#ff00dd'); // Pass any custom color