diff --git a/batch-add-recording-relationships.user.js b/batch-add-recording-relationships.user.js index d08889fb..26631100 100644 --- a/batch-add-recording-relationships.user.js +++ b/batch-add-recording-relationships.user.js @@ -730,7 +730,7 @@ function batch_recording_rels(gm_info) { ); } - let $reload = style_buttons($('')) + style_buttons($('')) .click(function () { $button_cell.css('display', 'none'); $msg.text(`Loading works for ${name}...`); diff --git a/lib/logger.js b/lib/logger.js index 4d3a8367..399fc421 100644 --- a/lib/logger.js +++ b/lib/logger.js @@ -2,6 +2,7 @@ // Logger /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// eslint-disable-next-line no-unused-vars const LOGGER = (function () { let LOG_LEVEL = 'info'; diff --git a/lib/mbimport.js b/lib/mbimport.js index e6234c40..e1bad46e 100644 --- a/lib/mbimport.js +++ b/lib/mbimport.js @@ -62,6 +62,7 @@ * */ +// eslint-disable-next-line no-unused-vars const MBImport = (function () { // --------------------------------------- publics ----------------------------------------- // diff --git a/lib/mbimportstyle.js b/lib/mbimportstyle.js index faeec1d2..734512cc 100644 --- a/lib/mbimportstyle.js +++ b/lib/mbimportstyle.js @@ -2,6 +2,7 @@ function _add_css(css) { document.head.insertAdjacentHTML('beforeend', ``); } +// eslint-disable-next-line no-unused-vars function MBImportStyle() { let css_import_button = ` #mb_buttons { @@ -42,6 +43,7 @@ function MBImportStyle() { _add_css(css_import_button); } +// eslint-disable-next-line no-unused-vars function MBSearchItStyle() { let css_search_it = ` .mb_valign { diff --git a/lib/mblinks.js b/lib/mblinks.js index 7b7ff447..0f5f1732 100644 --- a/lib/mblinks.js +++ b/lib/mblinks.js @@ -16,6 +16,7 @@ // user_cache_key = textual key used to store cached data in local storage // version = optionnal version, to force creation of a cache (ie. when format of keys changes) // expiration = time in minutes before an entry is refreshed, value <= 0 disables cache reads, if undefined or false, use defaults +// eslint-disable-next-line no-unused-vars const MBLinks = function (user_cache_key, version, expiration) { /** * Processes a URL match from the MusicBrainz API response: updates cache and inserts @@ -71,7 +72,7 @@ const MBLinks = function (user_cache_key, version, expiration) { this.supports_local_storage = (function () { try { return !!localStorage.getItem; - } catch (e) { + } catch { return false; } })(); diff --git a/mb_discids_detector.user.js b/mb_discids_detector.user.js index fc183f62..caf95db8 100644 --- a/mb_discids_detector.user.js +++ b/mb_discids_detector.user.js @@ -12,6 +12,8 @@ // @require lib/logger.js // ==/UserScript== +/* eslint-disable */ + console.warn( '[Musicbrainz DiscIds Detector]: ⚠️ This userscript has been rewritten in TypeScript and is now hosted at a new URL. It should auto-update to use the TS version automatically, but if it didn’t and you’re seeing this message, please upgrade it manually from https://raw.githubusercontent.com/murdos/musicbrainz-userscripts/dist/mb_discids_detector.user.js.', ); diff --git a/qobuz_importer.user.js b/qobuz_importer.user.js index bf6602e6..48a44202 100644 --- a/qobuz_importer.user.js +++ b/qobuz_importer.user.js @@ -31,7 +31,6 @@ const OPEN_QOBUZ_BASE = 'https://open.qobuz.com'; let is_classical = false; // release detected as classical let album_artist_data = {}; // for switching album artists on classical -let raw_release_data; function getOpenQobuzArtistUrl(artistId) { return `${OPEN_QOBUZ_BASE}/artist/${artistId}`; diff --git a/takealot_importer.user.js b/takealot_importer.user.js index f7ad76dd..63222f9c 100644 --- a/takealot_importer.user.js +++ b/takealot_importer.user.js @@ -36,14 +36,13 @@ if (DEBUG) { // promise to ensure all api calls are done before we parse the release const tracks_deferred = $.Deferred(); -const retrieve_tracks_promise = tracks_deferred.promise(); +tracks_deferred.promise(); // object to store all global attributes collected for the release const release_attributes = {}; // albumid, total_pages, artist_name, label // arrays to store the data retrieved from API to parse for MB release const album_api_array = []; // album information [0] -const tracks_api_array = []; // track information [0,1,2,..] one element for each pagination in FMA tracks API $(document).ready(function () { LOGGER.info('Document Ready & Takealot Userscript Executing'); @@ -65,9 +64,8 @@ $(document).ready(function () { $.when(retrieve_album_detail).done(function () { LOGGER.info('All the AJAX API calls are done continue to build the release object ...'); LOGGER.debug(`ALBUM Object > ${album_api_array[0]}`); - // LOGGER.debug("TRACK Object > " + tracks_api_array); - let FreeMusicArchiveRelease = new Parsefmarelease(album_api_array[0], tracks_api_array); + let FreeMusicArchiveRelease = new Parsefmarelease(album_api_array[0]); insertMBSection(FreeMusicArchiveRelease); let album_link = window.location.href; @@ -143,7 +141,7 @@ const updateAPISection = { }, ApiKey: function (apikey) { this.apikey = apikey; - $('#lbut-lt-fma-api-key-id').text(FMA_API); + $('#lbut-lt-fma-api-key-id').text(`FMA_API: ${this.apikey}`); return 'complete'; }, AlbumAjaxStatus: function (ajaxstatus) { @@ -301,45 +299,6 @@ function insertMBSection(release) { mbUI.slideDown(); } -// Insert MusicBrainz API section on FMA page to enter API Key -function insertAPIKEYSection() { - LOGGER.debug('FMA insertAPIKEYSection Function Executing'); - - let mbUI = $( - '