Skip to content

Commit

Permalink
fix: Two ISRC are pasted on non-bulk ISRC pasting
Browse files Browse the repository at this point in the history
  • Loading branch information
jesus2099 committed Dec 20, 2024
1 parent 7d5affc commit 051a5e5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mb_MASS-ISRC.user.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ==UserScript==
// @name mb. MASS ISRC
// @version 2024.10.19
// @version 2024.12.20
// @description kepstin’s magicisrc. Paste a bunch of ISRC instead of one by one
// @namespace https://github.com/jesus2099/konami-command
// @supportURL https://github.com/jesus2099/konami-command/labels/mb_MASS-ISRC
Expand All @@ -21,6 +21,7 @@ if (location.host === "magicisrc.kepstin.ca") {
if (event && event.target && event.target.classList.contains("form-control") && event.target.getAttribute("id").match(/^isrc\d+-\d+$/)) {
var isrcList = event.clipboardData.getData("text").toUpperCase().match(/[A-Z]{2}-?[A-Z0-9]{3}-?[0-9]{2}-?[0-9]{5}/g);
if (isrcList && (!arrHasDupes(isrcList) || confirm("Achtung, there are duplicates!"))) {
event.preventDefault();
var isrcInputs = event.currentTarget.querySelectorAll("table > tbody > tr > td input.form-control[id^='isrc']");
var lastUpdatedInput;
for (var isrc = 0, input = 0, startingInputIndex = null; input < isrcInputs.length; input += 1) {
Expand Down

0 comments on commit 051a5e5

Please sign in to comment.