pure-copyright
pure JavaScript version of copyright
Install
npm i -S pure-copyright
Usage
or <script src="https://unpkg.com/pure-copyright@latest"></script> documentbody
Options
You can pass an options object in plugin init method.
text
: The text that will be added when copying (Default:"<br>Original: " + window.location.href
);minlength
: The minimum length of the copied text when running the plugin (Default:0
).processing
: Function to process the copied text (Default:undefined
).
documentbody text: "<br><br>Reference: " + windowlocationhref minlength: 100 { console }
Methods:
- destory:Stop the plugin
Events:
You can listen Copyright events.
beforeCopy
afterCopy
documentbody { console }
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
Credits
Author
pure-copyright © sinchang, Released under the MIT License.
Authored and maintained by sinchang with help from contributors (list).
sinchang.me · GitHub @sinchang · Twitter @sinchangwen