You can re-use the Javascript code in this page under the terms of the GNU AGPL. See the licence notice in the source of the page for more details.