1.0.2 • Published 3 years ago

watermark-observer v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

watermark-observer

Build status Test coverage NPM version NPM Downloads Prettier Conventional Commits

Watermark effect with dom observer

Installation

npm install watermark-observer
# or use yarn
yarn add watermark-observer

Usage

import watermarkObserver, { watermarkObserverStandalone, createFixedWatermarkContainerDOM } from 'watermark-observer'

// 独立注入水印,检测到修改将会重新创建
watermarkObserverStandalone(createFixedWatermarkContainerDOM('water-mark-standlone'), require('./image.png').default)

// 注入水印至已有内容容器中,检测到修改将会重新设置样式
watermarkObserver(window.container, '/watermark')

Contributing

  • Fork it!
  • Create your new branch:
    git checkout -b feature-new or git checkout -b fix-which-bug
  • Start your magic work now
  • Make sure npm test passes
  • Commit your changes:
    git commit -am 'feat: some description (close #123)' or git commit -am 'fix: some description (fix #123)'
  • Push to the branch: git push
  • Submit a pull request :)

Authors

This library is written and maintained by 余聪, yucong06@meituan.com.

License

MIT - 余聪 🐟

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago