[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-librejs] Some suggestions for fewer false negatives

From: Luke T . Shumaker
Subject: [Bug-librejs] Some suggestions for fewer false negatives
Date: Mon, 30 Dec 2013 18:10:38 -0500
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (Goj┼Ź) APEL/10.8 EasyPG/1.0.0 Emacs/24.3 (i686-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

So, most pages that have free JS still register as false negatives
with LibreJS.  I was thinkng about ways to better handle that.

I was originally going to submit a patch, instead of just lame prose
(code is king), but some other things ended up eating my weekend.
I'll still submit patches for these if I find the time.

1. If the filename matches /\.min\.js$/, examine the same URL, but
   s/\.min\.js$/\.js/ , to see if that copy has licensing
2. Support fuzzy-matching for licensing information.  A JS file might
   contain licensing information, just not wrapped in
   @licstart/@licend.  Obviously, fuzzy-matching can't fix all
   false-negatives without introducing false positives, but I think
   a large number of them can be fixed without introducing any false
 A. If it contains the full "(.*) is free software: you can
    redistribute it and/or modify it under the terms "... GPL bit,
    word-for-word, it is pretty unambiguously GPL.
 B. Similarly, the format of the jQuery copyright header can be
     * Copyright ([0-9-]+) jQuery Foundation and other contributors
     * Released under the MIT license
     * http://jquery.org/license
    I expect that any file including this is actually jQuery.  I know
    LibreJS already recognizes jQuery based on the checksums, but if
    it has been run through another minifier (for example, as it is on
    the Parabola site[1]).
 C. The full text of the MIT, BSD, and other short licenses, also
    pretty unambiguously identify the license of the file. (Example:
    D3 on the Parabola website[2])

One more thing--the notificationbox'es that it shows, I think that it
should only show them in the tab that they are related to.  From what
I saw, notificationbox doesn't currently support specifying the tab.

[1]: https://parabolagnulinux.org/static/jquery-1.8.3.min.js
[2]: https://parabolagnulinux.org/static/d3-3.0.6.min.js

Happy hacking,
~ Luke Shumaker

reply via email to

[Prev in Thread] Current Thread [Next in Thread]