grayscale-body-js

1.0.0 • Public • Published

grayscaleBody.js

Bower Version Npm Version Release Version Downloads

Automatically turn the site to grayscale (may be used for some purpose)

grayscaleBody.js - screenshot 1

Install

1: npm

1.1 Install npm
1.2 Install package: `npm install --save grayscale-body-js`

2: bower

2.1 Install npm
2.2 Install bower: `npm install -g bower`
2.3 Install package: `bower install --save grayscale-body-js`

Getting Started for dev

  1. Install Node.js
  2. Set path (e.g. cd C:\xampp\htdocs\jojoee.com\grayscale-body-js)
  3. Install global: npm install -g gulp bower browser-sync
  4. Install dependencies: bower install && npm install
  5. Start: gulp to build and gulp watch to dev

Usage

// init
var option = {
  switcherPosition: 'bottom-right', // string: top-left, top-right, bottom-left, bottom-right
  isEnableSwitcher: true,           // boolean
  isDebug: true,                    // boolean
};

var gsb = new GrayscaleBody(option);

// event
gsb.on('onSwitchersClicked', function() {
  console.log('onSwitchersClicked - callback 1');
});

Feature

Note

  • 2 spaces for indent

TODO

  • Support IE edge
  • DocBlockr
  • Grayscale opacity customizer
  • Unit test
  • Separate utilities function into another files
  • Add callback event when switcher button's triggered
  • Add .npmignore
  • Implement ci.testling.com
  • Add E2E testing script by Nightwatch.js
  • Localization
  • Update demo page

Thank you

Package Sidebar

Install

npm i grayscale-body-js

Weekly Downloads

0

Version

1.0.0

License

GPL-2.0+

Last publish

Collaborators

  • jojoee