Skip to content

taufik-nurrohman/sticky-attribution

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Sticky Attribution

Insert attribution next to the copied text.

Sticky Attribution

Tested on Mozilla Firefox 53.0.3, Google Chrome 58.0.3029.110 and Internet Explorer 11.0.9600.16663.

Demo: https://taufik-nurrohman.github.io/sticky-attribution

Usage

<!DOCTYPE html>
<html dir="ltr">
  <head>
    <meta charset="utf-8">
    <title>Demo</title>
  </head>
  <body>
    <p>Content goes here.</p>
    <script src="sticky-attribution.min.js"></script>
  </body>
</html>

Note: This script will not add the attribution if you are copying text inside <pre>, <code> or any HTML container with class no-attribution in it.