Skip to content

Commit

Permalink
Detect video recordings
Browse files Browse the repository at this point in the history
The selector is already strict enough to not catch recordings from `div.ars` I guess those `:first-child` were there for that, but they are not needed and they are blocking video recording detection. 

(Editing on smartphone)
  • Loading branch information
jesus2099 authored Jul 11, 2024
1 parent 6fe3015 commit 63e1e22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mb_qol_inline_recording_tracks.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,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, table.medium td > span:first-child > span:first-child > a[href^="/recording/"]:first-child');
let recAnchors = document.querySelectorAll('table.medium td > a[href^="/recording/"], table.medium td > span > a[href^="/recording/"], table.medium td > span > span > a[href^="/recording/"]');
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 63e1e22

Please sign in to comment.