mirror of
https://github.com/murdos/musicbrainz-userscripts
synced 2024-12-13 11:52:27 +00:00
recording-comments: Delay script and match disc URL
* Delay script. Otherwise, React removes it. * Enable script on disc URL (ulugabi workaround for big releases)
This commit is contained in:
parent
b91f40247d
commit
41b34e57df
1 changed files with 8 additions and 8 deletions
|
@ -1,15 +1,13 @@
|
|||
// ==UserScript==
|
||||
// @name MusicBrainz: Set recording comments for a release
|
||||
// @description Batch set recording comments from a Release page.
|
||||
// @version 2021.8.22.1
|
||||
// @version 2022.2.3
|
||||
// @author Michael Wiencek
|
||||
// @license X11
|
||||
// @namespace 790382e7-8714-47a7-bfbd-528d0caa2333
|
||||
// @downloadURL https://raw.githubusercontent.com/murdos/musicbrainz-userscripts/master/set-recording-comments.user.js
|
||||
// @updateURL https://raw.githubusercontent.com/murdos/musicbrainz-userscripts/master/set-recording-comments.user.js
|
||||
// @match *://*.musicbrainz.org/release/*
|
||||
// @exclude *musicbrainz.org/release/*/*
|
||||
// @exclude *musicbrainz.org/release/add*
|
||||
// @include /^https?:\/\/(\w+\.)?musicbrainz\.org\/release\/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}(\/disc\/\d+|$)/
|
||||
// @grant none
|
||||
// @run-at document-idle
|
||||
// ==/UserScript==
|
||||
|
@ -41,9 +39,11 @@
|
|||
// authorization.
|
||||
// ==/License==
|
||||
|
||||
const scr = document.createElement('script');
|
||||
scr.textContent = `$(${setRecordingComments});`;
|
||||
document.body.appendChild(scr);
|
||||
setTimeout(function () {
|
||||
const scr = document.createElement('script');
|
||||
scr.textContent = `$(${setRecordingComments});`;
|
||||
document.body.appendChild(scr);
|
||||
}, 1000);
|
||||
|
||||
function setRecordingComments() {
|
||||
let $tracks;
|
||||
|
@ -93,7 +93,7 @@ function setRecordingComments() {
|
|||
});
|
||||
}, 1000);
|
||||
|
||||
if (!location.pathname.match(/^\/release\/[a-f\d]{8}-[a-f\d]{4}-[a-f\d]{4}-[a-f\d]{4}-[a-f\d]{12}$/)) {
|
||||
if (!location.pathname.match(/^\/release\/[a-f\d]{8}-[a-f\d]{4}-[a-f\d]{4}-[a-f\d]{4}-[a-f\d]{12}/)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue