From a625704796e131a130415f32c5bc0d0eca1bc131 Mon Sep 17 00:00:00 2001 From: Jerome Roy Date: Mon, 25 Nov 2024 00:52:40 +0000 Subject: [PATCH] Fix dialog box selector in editor --- mb-edit-edit_subworks.user.js | 6 +++--- mb-reledit-copy_dates.user.js | 2 +- mb-reledit-guess_works.user.js | 14 +++++++------- mb-reledit-set_instruments.user.js | 4 ++-- mb-reledit-set_rec_artist_as_writer.user.js | 8 ++++---- mb-reledit-set_relation_attrs.user.js | 4 ++-- 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/mb-edit-edit_subworks.user.js b/mb-edit-edit_subworks.user.js index 7840500..e453e52 100644 --- a/mb-edit-edit_subworks.user.js +++ b/mb-edit-edit_subworks.user.js @@ -4,7 +4,7 @@ // @name MusicBrainz edit: Replace subwork titles, disambiguations and attributes in Work edit page // @namespace mbz-loujine // @author loujine -// @version 2023.3.11 +// @version 2024.11.25 // @downloadURL https://raw.githubusercontent.com/loujine/musicbrainz-scripts/master/mb-edit-edit_subworks.user.js // @updateURL https://raw.githubusercontent.com/loujine/musicbrainz-scripts/master/mb-edit-edit_subworks.user.js // @supportURL https://github.com/loujine/musicbrainz-scripts @@ -127,10 +127,10 @@ function setSubworksAttributes(attrName) { button.click(); await helper.waitFor(() => !!MB.relationshipEditor.relationshipDialogDispatch, 1); - document.querySelector(`.dialog-content input#${attrName}-checkbox`).click(); + document.querySelector(`.relationship-dialog input#${attrName}-checkbox`).click(); await helper.delay(1); - document.querySelector('.dialog-content button.positive').click(); + document.querySelector('.relationship-dialog button.positive').click(); }); } diff --git a/mb-reledit-copy_dates.user.js b/mb-reledit-copy_dates.user.js index 2cae0ef..547d8a4 100644 --- a/mb-reledit-copy_dates.user.js +++ b/mb-reledit-copy_dates.user.js @@ -4,7 +4,7 @@ // @name MusicBrainz relation editor: Copy dates on recording relations // @namespace mbz-loujine // @author loujine -// @version 2024.4.11 +// @version 2024.11.25 // @downloadURL https://raw.githubusercontent.com/loujine/musicbrainz-scripts/master/mb-reledit-copy_dates.user.js // @updateURL https://raw.githubusercontent.com/loujine/musicbrainz-scripts/master/mb-reledit-copy_dates.user.js // @supportURL https://github.com/loujine/musicbrainz-scripts diff --git a/mb-reledit-guess_works.user.js b/mb-reledit-guess_works.user.js index 80a8857..f57e4bb 100644 --- a/mb-reledit-guess_works.user.js +++ b/mb-reledit-guess_works.user.js @@ -4,7 +4,7 @@ // @name MusicBrainz relation editor: Guess related works in batch // @namespace mbz-loujine // @author loujine -// @version 2023.3.12 +// @version 2024.11.25 // @downloadURL https://raw.githubusercontent.com/loujine/musicbrainz-scripts/master/mb-reledit-guess_works.user.js // @updateURL https://raw.githubusercontent.com/loujine/musicbrainz-scripts/master/mb-reledit-guess_works.user.js // @supportURL https://github.com/loujine/musicbrainz-scripts @@ -78,11 +78,11 @@ const setWork = async (recording, work, partial) => { } await helper.delay(1); - if (document.querySelector('.dialog-content p.error')) { + if (document.querySelector('.relationship-dialog p.error')) { console.error('Dialog error, probably an identical relation already exists'); - document.querySelector('.dialog-content button.negative').click(); + document.querySelector('.relationship-dialog button.negative').click(); } else { - document.querySelector('.dialog-content button.positive').click(); + document.querySelector('.relationship-dialog button.positive').click(); } }; @@ -113,11 +113,11 @@ const replaceWork = async (recording, work) => { }); await helper.delay(1); - if (document.querySelector('.dialog-content p.error')) { + if (document.querySelector('.relationship-dialog p.error')) { console.error('Dialog error, probably an identical relation already exists'); - document.querySelector('.dialog-content button.negative').click(); + document.querySelector('.relationship-dialog button.negative').click(); } else { - document.querySelector('.dialog-content button.positive').click(); + document.querySelector('.relationship-dialog button.positive').click(); } }; diff --git a/mb-reledit-set_instruments.user.js b/mb-reledit-set_instruments.user.js index 099b19e..900dc12 100644 --- a/mb-reledit-set_instruments.user.js +++ b/mb-reledit-set_instruments.user.js @@ -4,7 +4,7 @@ // @name MusicBrainz relation editor: set role in recording-artist relation // @namespace mbz-loujine // @author loujine -// @version 2023.3.6 +// @version 2024.11.25 // @downloadURL https://raw.githubusercontent.com/loujine/musicbrainz-scripts/master/mb-reledit-set_instruments.user.js // @updateURL https://raw.githubusercontent.com/loujine/musicbrainz-scripts/master/mb-reledit-set_instruments.user.js // @supportURL https://github.com/loujine/musicbrainz-scripts @@ -78,7 +78,7 @@ const setInstrument = (fromType, toType, fromAttrId, toAttrId, toCredit) => { }); await helper.delay(1); - document.querySelector('.dialog-content button.positive').click(); + document.querySelector('.relationship-dialog button.positive').click(); }); }); }; diff --git a/mb-reledit-set_rec_artist_as_writer.user.js b/mb-reledit-set_rec_artist_as_writer.user.js index a818d64..292946d 100644 --- a/mb-reledit-set_rec_artist_as_writer.user.js +++ b/mb-reledit-set_rec_artist_as_writer.user.js @@ -4,7 +4,7 @@ // @name MusicBrainz relation editor: Set writer relation from recording artist // @namespace mbz-loujine // @author loujine -// @version 2023.3.28 +// @version 2024.11.25 // @downloadURL https://raw.githubusercontent.com/loujine/musicbrainz-scripts/master/mb-reledit-set_rec_artist_as_writer.user.js // @updateURL https://raw.githubusercontent.com/loujine/musicbrainz-scripts/master/mb-reledit-set_rec_artist_as_writer.user.js // @supportURL https://github.com/loujine/musicbrainz-scripts @@ -81,11 +81,11 @@ const fillWriterDialog = async (work, track, artistCredit) => { }); await helper.delay(10); - if (document.querySelector('.dialog-content p.error')) { + if (document.querySelector('.relationship-dialog p.error')) { console.error('Dialog error, probably an identical relation already exists'); - document.querySelector('.dialog-content button.negative').click(); + document.querySelector('.relationship-dialog button.negative').click(); } else { - document.querySelector('.dialog-content button.positive').click(); + document.querySelector('.relationship-dialog button.positive').click(); } }; diff --git a/mb-reledit-set_relation_attrs.user.js b/mb-reledit-set_relation_attrs.user.js index aa7bce0..336ca59 100644 --- a/mb-reledit-set_relation_attrs.user.js +++ b/mb-reledit-set_relation_attrs.user.js @@ -4,7 +4,7 @@ // @name MusicBrainz relation editor: Set relation attributes // @namespace mbz-loujine // @author loujine -// @version 2023.3.6 +// @version 2024.11.25 // @downloadURL https://raw.githubusercontent.com/loujine/musicbrainz-scripts/master/mb-reledit-set_relation_attrs.user.js // @updateURL https://raw.githubusercontent.com/loujine/musicbrainz-scripts/master/mb-reledit-set_relation_attrs.user.js // @supportURL https://github.com/loujine/musicbrainz-scripts @@ -58,7 +58,7 @@ const setAttributes = (targetType, attrName, toggle) => { }); await helper.delay(1); - document.querySelector('.dialog-content button.positive').click(); + document.querySelector('.relationship-dialog button.positive').click(); }); }); };