Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Clearly indicate reddit's JavaScript license info with LibreJS labels #943

Closed
Habstinat opened this Issue · 1 comment

2 participants

@Habstinat

I figured I would let the post activity settle down before making this issue, as for some reason this seems to be a highly debated request. If you're interested in fighting that debate, please do so at the reddit post rather than here. That post is rife with information from both sides, so I'd advise glancing over the comments before discussing the issue here.

Anyways, the problem is that, while all of reddit's JavaScript is free, none of it is tagged in a way that computers can understand. Here are just some examples of the minified JavaScript in question:

As you can see, none of these files have any license information in them. Even though the license may be declared at the GitHub page, if the license of software is not clearly defined when it is distributed to the user, it creates legal problems for reddit and makes it harder for other programs to identify such software.

This can be fixed in a few ways with LibreJS license lables, and it does not have to require extra bandwidth to provide the license information if people do not want to fetch it, so reddit can still enjoy the benefits of code minification. If my abridged version is not informative enough, GNU has some nice documentation on this issue. This does not require changing the license of any of reddit's code; just clarifying what's already there.

Firstly, if inline JavaScript is used, reddit could place this notice in script tags at the top of a page to kill all the birds with one stone:

<script>
/*    
@licstart  The following is the entire license notice for the 
JavaScript code in this page.

Copyright (c) 2006-2013 reddit Inc. All Rights Reserved.

"The contents of this file are subject to the Common Public Attribution License
Version 1.0. (the "License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://code.reddit.com/LICENSE. The License is based on the Mozilla Public
License Version 1.1, but Sections 14 and 15 have been added to cover use of
software over a computer network and provide for limited attribution for the
Original Developer. In addition, Exhibit A has been modified to be consistent
with Exhibit B.

Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the
specific language governing rights and limitations under the License.

@licend  The above is the entire license notice
for the JavaScript code in this page.
*/
</script>

If the file in question is an external script, the same notice can be placed in a stylized comment at the beginning of that file. If the file is minimized and an expanded version of that file exists, just add a line before @licstart that reads @source: <URL of expanded version>.

However, that option takes up some amount of bandwidth, if only a few bytes, which reddit may not like. reddit can use Web Labels to avoid this problem; the format for that is somewhat more complex but basically involves creating a small link at the bottom of every page to a separate "JavaScript License Information" page, which has a specially-crafted HTML table which lists the licenses and expanded versions of every JS file that hasn't been tagged inline.

I hope that reddit implements these changes to make their licenses more clear to users.

Footnote: Although CPAL isn't currently recognized by LibreJS due to it being uncommon, I'm in the process of communicating with lduros and it will likely be trivial to add it soon.

@Habstinat Habstinat closed this
@Habstinat Habstinat reopened this
@spladug
Owner

See CONTRIBUTING.md. This tracker is for confirmed bugs, not requests.

@spladug spladug closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.