Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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 .
```