Skip to content

Commit e4c25b5

Browse files
committed
Correctly update colorizeChars based on the tape type
1 parent 4eaa1b2 commit e4c25b5

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<title>LTO Barcode Generator</title>
66
<meta name="viewport" content="width=device-width, initial-scale=1.0">
77
<link rel="stylesheet" type="text/css" href="lto.css">
8-
<script type="text/javascript" src="lto.js.php"></script>
8+
<script type="text/javascript" src="lto.js.php" defer></script>
99
</head>
1010
1111
<body onload="Init()">

lto.js.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,17 @@ function updateTapeType() {
106106
if (type == "normal") {
107107
document.getElementsByName("prefix")[0].value = "ABC";
108108
document.getElementsByName("prefix")[0].disabled = false;
109+
document.querySelector('input[name="colorizeChars"]').checked = true;
109110
document.querySelector('select[name="colorscheme"]').value = 'HOT';
110111
} else if (type == "cln") {
111112
document.getElementsByName("prefix")[0].value = "CLN";
112113
document.getElementsByName("prefix")[0].disabled = true;
114+
document.querySelector('input[name="colorizeChars"]').checked = false;
113115
document.querySelector('select[name="colorscheme"]').value = 'BW';
114116
} else if (type == "dg") {
115117
document.getElementsByName("prefix")[0].value = "DG ";
116118
document.getElementsByName("prefix")[0].disabled = true;
119+
document.querySelector('input[name="colorizeChars"]').checked = false;
117120
document.querySelector('select[name="colorscheme"]').value = 'INV';
118121
}
119122
updateTextlabel();

0 commit comments

Comments
 (0)