Skip to content

Commit 051a5e5

Browse files
committed
fix: Two ISRC are pasted on non-bulk ISRC pasting
1 parent 7d5affc commit 051a5e5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mb_MASS-ISRC.user.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ==UserScript==
22
// @name mb. MASS ISRC
3-
// @version 2024.10.19
3+
// @version 2024.12.20
44
// @description kepstin’s magicisrc. Paste a bunch of ISRC instead of one by one
55
// @namespace https://github.com/jesus2099/konami-command
66
// @supportURL https://github.com/jesus2099/konami-command/labels/mb_MASS-ISRC
@@ -21,6 +21,7 @@ if (location.host === "magicisrc.kepstin.ca") {
2121
if (event && event.target && event.target.classList.contains("form-control") && event.target.getAttribute("id").match(/^isrc\d+-\d+$/)) {
2222
var isrcList = event.clipboardData.getData("text").toUpperCase().match(/[A-Z]{2}-?[A-Z0-9]{3}-?[0-9]{2}-?[0-9]{5}/g);
2323
if (isrcList && (!arrHasDupes(isrcList) || confirm("Achtung, there are duplicates!"))) {
24+
event.preventDefault();
2425
var isrcInputs = event.currentTarget.querySelectorAll("table > tbody > tr > td input.form-control[id^='isrc']");
2526
var lastUpdatedInput;
2627
for (var isrc = 0, input = 0, startingInputIndex = null; input < isrcInputs.length; input += 1) {

0 commit comments

Comments
 (0)