jQuery plugin providing visual reinforcement for content licenses
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
css
demos
js
CREDITS.md
LICENSE.txt
README.md
copylight-logo.png

README.md

Copylight logo

CopyLight is an experimental jQuery plugin that allows websites to emphasize the licensing terms of their content, if a user has selected a substantial amount of it on a page. (What constitutes a "substantial" selection is customizable, but defaults to 256 characters.) The license terms are emphasized without making text selections brittle or unreliable...nor is attribution injected to the clipboard without the user's consent (as is done by systems like "Tynt").

When a large enough selection happens to trigger the plugin, a color-coded "stoplight button" appears. This button is placed as near as possible to the point of selection to make it easy to click and to see what it is attached to. Pushing the button brings up a dialog which provides a reminder of the site's license terms, and also gives a convenient URL to share with an easy one-click copy. Yet the final decision is left to the user; and browser functionality for copying is not interfered with.

Although CopyLight can be used to draw a page visitor's attention to a "red light" licensing restriction, it can also emphasize "green light" or "yellow light" freedoms governing content that uses Creative Commons licenses.

I personally think it would best to live in a world where we wouldn't need such things. But it was created to present as an alternative to those who would use patently worse solutions (like disabling copying or selection entirely). See copylight.hostilefork.com for more information about this experiment and the motivations for creating it.

Using CopyLight on Your Page

CopyLight is a jQuery plugin, and follows the conventions for such plugins. This means you can use selectors and call the .copylight() method with options to activate the behavior on the selected elements:

$(selector).copylight({...options...});

Yet there's an easier way to use CopyLight on a page. Just include its JavaScript and CSS files in your page's header, and mark document elements with a class attribute for the license that applies to the elements underneath them. For instance:

<div class="cc-by-sa">Text licensed Creative Commons Attribution-ShareAlike</div>

The supported class names are:

Green Light (no restrictions)

Yellow Light (some restrictions)

Red Light (all rights reserved)

License

Copylight is released under the MIT License.