Skip to content
This repository has been archived by the owner. It is now read-only.
DEPRECATED Creative Commons JavaScript license selector in the form of a JavaScript widget
JavaScript HTML Python PHP CSS Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
example_web_app
images
js
.htaccess
Makefile
README.md
accept-to-gettext.inc.php
append_ourselves.js
complete.js
depends.py
gen_template_js.py
gen_translations.py
html2dom.js
phphelpers.php
template.html
update_jurisdictions.py

README.md

jswidget

This is the Creative Commons JavaScript license selector in the form of a JavaScript widget.

Web browsers can only be expected to load a single file from us.

Deprecated

⛔️ This project is deprecated by creativecommons/cc-license-chooser

Overview

The code is structured as follows:

  • An HTML page includes complete.js, which PHP renders
    • they can pass a variable on the query string to set the language, which is why we involve PHP
    • an alternate design would be to include different static files: complete.en.js, etc.
  • complete.js loads the CSS and static JS files that hardly change
  • complete.js loads template.js.var (for Apache Content Negotiation to pick a language) or template.js.LANG_ID if a language was specified

All of our JS and HTML and CSS is prefixed with cc_js_ to avoid namespace collisions with others' applications.

Every night, if you run make -s here, it'll update the translations and jurisdiction info.

Credits

I’m not familiar with the all license options, so I don’t even bother. Everything on posted this site is public domain (http://www.phpied.com/html2dom/)

You can’t perform that action at this time.