Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep EASY_DATE year updated #102

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions mb-edit-create_from_wikidata.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// @name MusicBrainz edit: Create entity or fill data from wikipedia / wikidata / VIAF / ISNI
// @namespace mbz-loujine
// @author loujine
// @version 2023.3.11
// @version 2024.9.18
// @downloadURL https://raw.githubusercontent.com/loujine/musicbrainz-scripts/master/mb-edit-create_from_wikidata.user.js
// @updateURL https://raw.githubusercontent.com/loujine/musicbrainz-scripts/master/mb-edit-create_from_wikidata.user.js
// @supportURL https://github.com/loujine/musicbrainz-scripts
Expand Down Expand Up @@ -248,12 +248,12 @@ class WikiDataHelpers {
}
return;
}
setValue(prefix + '.year', date.getFullYear());
setValue(prefix + '.year', date.getUTCFullYear());
const yearInput = document.getElementById(prefix + '.year');
if (!yearInput) {
return;
}
if (yearInput.classList.contains('jesus2099')) {
if (yearInput.className.indexOf('jesus2099') > 0) {
// jesus2099's EASY_DATE script is shifting the input node
// containing the year but not its id
yearInput.nextSibling.value = date.getUTCFullYear();
Expand Down
Loading