Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/informatix8/source-attribution
Append content to copied clipboard text.
https://github.com/informatix8/source-attribution
attribution branding copy-paste
Last synced: about 1 month ago
JSON representation
Append content to copied clipboard text.
- Host: GitHub
- URL: https://github.com/informatix8/source-attribution
- Owner: informatix8
- Created: 2019-07-25T18:07:42.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-07-26T13:40:26.000Z (over 5 years ago)
- Last Synced: 2024-12-21T04:13:29.439Z (about 2 months ago)
- Topics: attribution, branding, copy-paste
- Language: JavaScript
- Size: 11.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Source Attribution
Append content to copied clipboard text.
## Features
- Append your product name and source URL to copied text from your web page
- Custom copied character count threshold for addiing the content
- Tag copy events in Google Analytics## Dependencies
- Lodash merge function
## Usage
### Install
```shell
npm install @informatix8/source-attribution --save-dev
```### CDN
```html
```
### Vanilla Javascript
```javascript
new SourceAttribution({
productName: 'My Product'
});
```### Add Google Analytics
Google Analytics instructs that you add their javascript to the `` of your document.
```html
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-xxxxxxxxx-x');
```
## Development
```shell
npm run dev
```## Build
```shell
npm run build
```## Release
```shell
npm run build
git tag -a vX.Y.Z
git push origin master
git push origin --tags
npm publish --access=public .
```