From 9655a6c17fd9c78ad18cf4fb299ca9ce31173b6a Mon Sep 17 00:00:00 2001 From: mirk0dex Date: Sat, 17 Sep 2022 19:51:15 +0200 Subject: [PATCH] Made scripts LibreJS-compliant --- freesound/static/bw-frontend/build.js | 4 ++++ freesound/static/bw-frontend/bw-icons/demo-files/demo.js | 4 ++++ .../static/bw-frontend/bw-icons_old/demo-files/demo.js | 4 ++++ freesound/static/bw-frontend/nunjucks.config.js | 3 +++ .../static/bw-frontend/src/components/afterDownloadModal.js | 4 ++++ .../static/bw-frontend/src/components/bookmarkSound.js | 4 ++++ freesound/static/bw-frontend/src/components/carousel.js | 4 ++++ freesound/static/bw-frontend/src/components/checkbox.js | 6 +++++- .../static/bw-frontend/src/components/collapsableBlock.js | 3 +++ .../static/bw-frontend/src/components/cookieConsent.js | 4 ++++ .../static/bw-frontend/src/components/djangoMessages.js | 4 ++++ freesound/static/bw-frontend/src/components/dropdown.js | 4 ++++ freesound/static/bw-frontend/src/components/explicit.js | 6 +++++- .../bw-frontend/src/components/formDisableOnSubmit.js | 4 ++++ freesound/static/bw-frontend/src/components/forumSelect.js | 4 ++++ freesound/static/bw-frontend/src/components/geotagPicker.js | 6 +++++- freesound/static/bw-frontend/src/components/index.js | 6 +++++- freesound/static/bw-frontend/src/components/input.js | 4 ++++ freesound/static/bw-frontend/src/components/loginModals.js | 4 ++++ freesound/static/bw-frontend/src/components/mapsMapbox.js | 6 +++++- freesound/static/bw-frontend/src/components/modal.js | 4 ++++ freesound/static/bw-frontend/src/components/navbar.js | 4 ++++ .../bw-frontend/src/components/player/audio-element.js | 4 ++++ freesound/static/bw-frontend/src/components/player/index.js | 3 +++ .../bw-frontend/src/components/player/player-setup.js | 3 +++ .../static/bw-frontend/src/components/player/player-ui.js | 4 ++++ .../static/bw-frontend/src/components/player/settings.js | 4 ++++ freesound/static/bw-frontend/src/components/player/utils.js | 4 ++++ freesound/static/bw-frontend/src/components/propagation.js | 4 ++++ freesound/static/bw-frontend/src/components/radio.js | 4 ++++ freesound/static/bw-frontend/src/components/recaptcha.js | 4 ++++ freesound/static/bw-frontend/src/components/select.js | 4 ++++ .../static/bw-frontend/src/components/similarSoundsModal.js | 4 ++++ freesound/static/bw-frontend/src/components/toast.js | 6 +++++- freesound/static/bw-frontend/src/components/typeahead.js | 4 ++++ .../static/bw-frontend/src/components/unsecureImageCheck.js | 6 +++++- freesound/static/bw-frontend/src/index.js | 4 ++++ freesound/static/bw-frontend/src/pages/donate.js | 3 +++ freesound/static/bw-frontend/src/pages/editProfile.js | 6 +++++- freesound/static/bw-frontend/src/pages/front.js | 4 ++++ .../static/bw-frontend/src/pages/loginAndRegistration.js | 6 +++++- freesound/static/bw-frontend/src/pages/map.js | 4 ++++ freesound/static/bw-frontend/src/pages/pack.js | 4 ++++ freesound/static/bw-frontend/src/pages/page-polyfills.js | 4 ++++ freesound/static/bw-frontend/src/pages/profile.js | 4 ++++ freesound/static/bw-frontend/src/pages/sound.js | 3 +++ freesound/static/bw-frontend/src/utils/cookies.js | 4 ++++ freesound/static/bw-frontend/src/utils/formSerializer.js | 4 ++++ freesound/static/bw-frontend/src/utils/icons.js | 4 ++++ freesound/static/bw-frontend/src/utils/postRequest.js | 4 ++++ freesound/static/bw-frontend/src/utils/responsive.js | 4 ++++ freesound/static/bw-frontend/src/utils/wait.js | 4 ++++ freesound/static/bw-frontend/start.js | 4 ++++ freesound/static/bw-frontend/styles/a.out | 0 54 files changed, 215 insertions(+), 9 deletions(-) create mode 100644 freesound/static/bw-frontend/styles/a.out diff --git a/freesound/static/bw-frontend/build.js b/freesound/static/bw-frontend/build.js index 855eaa161..3b00a9691 100644 --- a/freesound/static/bw-frontend/build.js +++ b/freesound/static/bw-frontend/build.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-later + const inquirer = require('inquirer'); const shell = require('shelljs'); @@ -33,3 +35,5 @@ const start = async () => { }; start(); + +// @license-end diff --git a/freesound/static/bw-frontend/bw-icons/demo-files/demo.js b/freesound/static/bw-frontend/bw-icons/demo-files/demo.js index 6f45f1c40..03b1ed3ae 100644 --- a/freesound/static/bw-frontend/bw-icons/demo-files/demo.js +++ b/freesound/static/bw-frontend/bw-icons/demo-files/demo.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-later + if (!('boxShadow' in document.body.style)) { document.body.setAttribute('class', 'noBoxShadow'); } @@ -28,3 +30,5 @@ document.body.addEventListener("click", function(e) { testText.addEventListener('change', updateTest, false); updateSize(); }()); + +// @license-end diff --git a/freesound/static/bw-frontend/bw-icons_old/demo-files/demo.js b/freesound/static/bw-frontend/bw-icons_old/demo-files/demo.js index 6f45f1c40..03b1ed3ae 100755 --- a/freesound/static/bw-frontend/bw-icons_old/demo-files/demo.js +++ b/freesound/static/bw-frontend/bw-icons_old/demo-files/demo.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-later + if (!('boxShadow' in document.body.style)) { document.body.setAttribute('class', 'noBoxShadow'); } @@ -28,3 +30,5 @@ document.body.addEventListener("click", function(e) { testText.addEventListener('change', updateTest, false); updateSize(); }()); + +// @license-end diff --git a/freesound/static/bw-frontend/nunjucks.config.js b/freesound/static/bw-frontend/nunjucks.config.js index 6bd4e5387..4dda26790 100644 --- a/freesound/static/bw-frontend/nunjucks.config.js +++ b/freesound/static/bw-frontend/nunjucks.config.js @@ -1,4 +1,7 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-later + module.exports = { root: './html' } +// @license-end diff --git a/freesound/static/bw-frontend/src/components/afterDownloadModal.js b/freesound/static/bw-frontend/src/components/afterDownloadModal.js index 2633315fd..f08e72a85 100644 --- a/freesound/static/bw-frontend/src/components/afterDownloadModal.js +++ b/freesound/static/bw-frontend/src/components/afterDownloadModal.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-later + import {handleGenericModal} from './modal'; @@ -12,3 +14,5 @@ const bindDownloadSoundButtons = () => { } bindDownloadSoundButtons(); + +// @license-end diff --git a/freesound/static/bw-frontend/src/components/bookmarkSound.js b/freesound/static/bw-frontend/src/components/bookmarkSound.js index 7028e4639..2084d9e56 100644 --- a/freesound/static/bw-frontend/src/components/bookmarkSound.js +++ b/freesound/static/bw-frontend/src/components/bookmarkSound.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-later + import {handleDismissModal, handleGenericModal} from "./modal"; import {createSelect} from "./select"; import {showToast} from "./toast"; @@ -69,3 +71,5 @@ const bindBookmarkSoundButtons = () => { } bindBookmarkSoundButtons(); + +// @license-end diff --git a/freesound/static/bw-frontend/src/components/carousel.js b/freesound/static/bw-frontend/src/components/carousel.js index 97fbac9e3..9514453c4 100644 --- a/freesound/static/bw-frontend/src/components/carousel.js +++ b/freesound/static/bw-frontend/src/components/carousel.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-later + import { createIconElement } from '../utils/icons' import { isTouchEnabledDevice } from './player/utils' @@ -98,3 +100,5 @@ carousels.forEach(carousel => { } setPage(0) }) + +// @license-end diff --git a/freesound/static/bw-frontend/src/components/checkbox.js b/freesound/static/bw-frontend/src/components/checkbox.js index ec0399248..d25215018 100644 --- a/freesound/static/bw-frontend/src/components/checkbox.js +++ b/freesound/static/bw-frontend/src/components/checkbox.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-later + const addVisibleCheckbox = (checkboxEl) => { // We want elements to be inside their corresponding