biati-digital / glightbox

Pure Javascript lightbox with mobile support. It can handle images, videos with autoplay, inline content and iframes
MIT License
2.03k stars 228 forks source link

MIT License in (minified) JavaScript and CSS files #308

Closed acc987 closed 2 years ago

acc987 commented 2 years ago

Describe the bug From my understanding, the copyright and permission notice in your license file must be preserved when redistributing copies of your software, see license.md, which also happens when someone is hosting the JavaScript and CSS files locally.

Unfortunately, neither the original nor the minified sources in dist/ contain a copy of the copyright and permission notice as specified in the MIT license.

(Note also that the README.md link to the license file points to LICENSE.md, which technically does not exist as you are currently using a lower case version of this filename. I wouldn't mind if you revert this to the upper case filename for consistency with the remaining markdown filenames, but keep in mind that you might have to update the links on your GitHub and your demo page.)

Are you able to reproduce the bug in the demo site From what I understand, the link to the license file at the demo site should not be enough to satisfy the license conditions, so the demo site should be affected as well.

Expected behavior As one does automatically not end up with a copy of the copyright and permission notice when following your suggested usage, I would appreciate it if you could make sure that the files intended for redistribution meet the license requirements from the get go or at least clarify as to what steps are necessary to comply with your license.

Post the code you are using For the time being, I will include my copy of GLightbox via:

<link rel="stylesheet" type="text/css" href="dist/css/glightbox.min.css" />
<script src="dist/js/glightbox.min.js">
/* GLightbox by Biati Digital is licensed under the MIT license:
 *
 * Copyright (c) 2018 Biati Digital https://www.biati.digital
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to
 * deal in the Software without restriction, including without limitation the
 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 * sell copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 * IN THE SOFTWARE.
 */
</script>

This should comply with your license terms as far as I can tell, but I would still appreciate it if a solution is provided that does not involve manual interaction from the user.

biati-digital commented 2 years ago

Hi @acc987 When we created the code we needed the dist files completely minified so all comments were removed, this is no longer needed so we'll definitely add this in a future version.

We are not planning to include the full license text with every minified file, we might include the short version like vue js or react js.

/*!
 * Vue.js v2.6.14
 * (c) 2014-2021 Evan You
 * Released under the MIT License.
 */
/** @license React v16.14.0
 * react.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */