File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change 2424 echo "\n" ;
2525}
2626
27- echo '
27+ ?>
2828
2929function getColor() {
3030 return document.getElementsByName("colorscheme")[0].value;
@@ -55,12 +55,14 @@ function updateTextlabel() {
5555}
5656
5757function updateColors() {
58- l1.style.backgroundColor = eval(getColor() + " [l1.firstChild.nodeValue]");
59- l2.style.backgroundColor = eval(getColor() + " [l2.firstChild.nodeValue]");
60- l3.style.backgroundColor = eval(getColor() + " [l3.firstChild.nodeValue]");
61- l4.style.backgroundColor = eval(getColor() + " [l4.firstChild.nodeValue]");
62- l5.style.backgroundColor = eval(getColor() + " [l5.firstChild.nodeValue]");
63- l6.style.backgroundColor = eval(getColor() + " [l6.firstChild.nodeValue]");
58+ for (var i = 1; i <= 6; i++) {
59+ let char = eval("l" + i + ".firstChild.nodeValue");
60+ if (/^[a-zA-Z]$/.test(char) && !document.querySelector('input[name="colorizeChars"]').checked) {
61+ eval("l" + i + ".style.backgroundColor = " + getColor() + " [' ']");
62+ } else {
63+ eval("l" + i + ".style.backgroundColor = " + getColor() + " [l" + i + ".firstChild.nodeValue]");
64+ }
65+ }
6466}
6567
6668function updateTapeGen() {
@@ -118,5 +120,3 @@ function Init() {
118120 updateTapeGen();
119121 updateTapeType();
120122}
121-
122- ' ;
You can’t perform that action at this time.
0 commit comments