Skip to content

Commit

Permalink
fix(inline recs): Tracks with span.mp and span.name-variation are ski…
Browse files Browse the repository at this point in the history
…pped

Tracks with pending edits and different title as recording have
both span.mp and span.name-variation.

    <td><span class="mp"><span class="name-variation"><a href="/recording/...

Only one level of span (either .mp or .name-variation) was handled.
  • Loading branch information
jesus2099 committed May 2, 2024
1 parent 7caebdd commit ec7b908
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mb_qol_inline_recording_tracks.user.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ==UserScript==
// @name MB: QoL: Inline all recording's tracks on releases
// @version 2024.5.1
// @version 2024.5.2
// @description Display all tracks and releases on which a recording appears from the release page.
// @author ROpdebee
// @license MIT; https://opensource.org/licenses/MIT
Expand Down Expand Up @@ -94,7 +94,7 @@ function insertRows(recordingTd, recordingInfo) {
}

function loadAndInsert() {
let recAnchors = document.querySelectorAll('table.medium td > a[href^="/recording/"]:first-child, table.medium td > span:first-child > a[href^="/recording/"]:first-child');
let recAnchors = document.querySelectorAll('table.medium td > a[href^="/recording/"]:first-child, table.medium td > span:first-child > a[href^="/recording/"]:first-child, table.medium td > span:first-child > span:first-child > a[href^="/recording/"]:first-child');
let todo = [...recAnchors]
.map((a) => [a.closest('td'), a.href.split('/recording/')[1]])
.filter(([td]) => !td.querySelector('div.ars.ROpdebee_inline_tracks'));
Expand Down

0 comments on commit ec7b908

Please sign in to comment.