From 64db3b57d14c783546ce5f9ca94ed85c9f6b9b79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Mino?= Date: Sat, 14 Feb 2015 20:30:25 +0100 Subject: [PATCH 1/2] Fix detection of tracks and recording links after 2015-02-09 server release. --- set-recording-comments.user.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/set-recording-comments.user.js b/set-recording-comments.user.js index e971c49..31d67b9 100644 --- a/set-recording-comments.user.js +++ b/set-recording-comments.user.js @@ -1,4 +1,4 @@ -// ==UserScript== +// ==UserScript== // @name MusicBrainz: Set recording comments for a release // @version 2014-11-11 // @author Michael Wiencek @@ -31,7 +31,7 @@ function setRecordingComments() { if ($("th.video").length > 0) { nameColumn = 2; } - $tracks = $(".tbl tbody tr[data-bind*='even:']"); + $tracks = $(".medium tbody tr[id]"); if ($tracks.length) { clearInterval(delay); @@ -43,7 +43,7 @@ function setRecordingComments() { var $td = $(this).children("td").eq(nameColumn), node = ($td.find(".mp")[0] || $td.find(".name-variation")[0] || - $td.find("a[href^=\\/recording\\/]")[0]), + $td.find("a[href*=\\/recording\\/]")[0]), $input = $("").addClass("recording-comment").insertAfter(node); if (!editing) { @@ -142,7 +142,7 @@ function setRecordingComments() { $input.css("border-color", "red").prop("disabled", false); }); - var link = $(track).children("td").eq(nameColumn).find("a[href^=\\/recording\\/]")[0], + var link = $(track).children("td").eq(nameColumn).find("a[href*=\\/recording\\/]")[0], mbid = link.href.match(MBID_REGEX)[0]; editData.push(MB.edit.recordingEdit({ to_edit: mbid, comment: comment }, {})); From acc71cb95e772e26261a1a5be2892917837f11f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Mino?= Date: Sat, 14 Feb 2015 23:30:30 +0100 Subject: [PATCH 2/2] Fix location of editing form. --- set-recording-comments.user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/set-recording-comments.user.js b/set-recording-comments.user.js index 31d67b9..c15dabc 100644 --- a/set-recording-comments.user.js +++ b/set-recording-comments.user.js @@ -78,7 +78,7 @@ function setRecordingComments() { $(this).css("border-color", this.value === $(this).data("old") ? "#999" : "red"); }); - var $container = $("
").insertBefore("table.tbl"); + var $container = $("
").insertAfter("h2.tracklist"); $("") .addClass("styled-button")