1.0.3 • Published 4 years ago

montimark v1.0.3

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

https://webmonetization.org/

Requirement

A Monetization provider like Coil and the Chrome plugin e.g https://chrome.google.com/webstore/detail/coil/locbifcbeldmnphbgkdigjmkbfkhbnca/related?hl=en

Install

npm install montimark --save

Usage

new Montimark('.selector', 'watermarkpath.jpg');

// or with options

var options = { 
    rect: { w: 100, h: 100 }, // boundaries of the watermark
    position: { x: 20, y: 50 } // watermark position
  };

new Montimark('.selector', 'watermarkpath.jpg', options);

Options

PropertyDefaultUsage
rectw: null, h: null{ rect: { w: 100, h: 100 } }
positionX: 10 , y: 10{ position: { x: 100, y: 100 } } OR { position: { x: 'left', y: 'bottom' } }
opacity1-
crossOrigin'*'-
loaderGray ghost background{ loader : 'loader.gif' }

Run code

You can test demonetizion on the demo Page

git clone https://github.com/domEscobar/montimark
npm run install
npm run start

Todo

Clean the code

Contributing

PR's and issues are welcome: https://github.com/domEscobar/montimark/issues