by Loic Duros
<script> var myString = "Hello World!"; alert(myString); </script>
<a href="#" onclick="alert('Hello World!')">Say Hello</a>
and the following will be executed right after the page has loaded:
<body onload="alert('Hello World!')">
LibreJS also lists these elements for you in the display panel.
Since it is impossible in general for a machine to understand what that program does, LibreJS cannot tell what that code is or whether it comes from, or whether it is free.
Scripts that are not yours, but are free
This is often the case with libraries, such as jQuery, Mootools, or Prototype, and the third-party plugins that are developed with it. LibreJS v4.7 can detect many free libraries by default, but there are too many plugins available for these libraries and you will still need to add license information to plugins. By looking at the source code or checking the upstream site, you should be able to tell what license is being used. Please ensure these licenses are free and GPL-compatible.
Scripts that are not yours and are not free
Often you can find existing free replacements for the functionality of the nonfree script. We would like to help you; write to email@example.com.
In some cases (analytics and social media sites), what the code does is give information about your users to companies. That would be a bad thing for your site to do even if it were done with free software. The right way to do analytics is with free software such as Piwik. That way you don't give information about your site's visitors to anyone.
Scripts that are yours
Step 3: Adding license information
As mentioned in the previous section, you can find a list of licenses detected as free by LibreJS in the project's documentation.
<table id="jslicense-labels1"> <tr> <td><a href="/js/jquery-1.7.min.js">jquery-1.7.min.js</a></td> <td><a href="http://www.jclark.com/xml/copying.txt">Expat</a></td> <td><a href="/js/jquery-1.7.tar.gz">jquery-1.7.tar.gz</a></td> </tr> </table>
It should have the id of 'jslicense-labels1'. For each external script, you must add a table row (
LibreJS identifies the licenses for these scripts using the canonical URL in the second column. A list of the licenses currently detected along with their canonical URL is available in the GNU LibreJS documentation.
Finally, you must add a link to the new page from all the pages loading these files. Don't forget to add a "rel" attribute with "jslicense" as its value:
Updated: $Date: 2012/05/31 20:33:03 $