minor html and JS fixes
* avoid implicit creation of global vars * removed stray </small> * fix assignment with undefined variables
This commit is contained in:
@@ -288,7 +288,7 @@ function generateSegmentOptions(array) {
|
|||||||
|
|
||||||
// Get segments from device
|
// Get segments from device
|
||||||
async function getSegments() {
|
async function getSegments() {
|
||||||
cv = gurl.value;
|
const cv = gurl.value;
|
||||||
if (cv.length > 0 ){
|
if (cv.length > 0 ){
|
||||||
try {
|
try {
|
||||||
var arr = [];
|
var arr = [];
|
||||||
|
|||||||
@@ -381,8 +381,8 @@ button, .btn {
|
|||||||
<div><a href="#" class="tk" data-t="#DDDD">#DDDD</a> - Weekday (Monday)</div>
|
<div><a href="#" class="tk" data-t="#DDDD">#DDDD</a> - Weekday (Monday)</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin:10px;padding-top:10px;border-top:1px solid #444">
|
<div style="margin:10px;padding-top:10px;border-top:1px solid #444">
|
||||||
<strong>Tips:</strong></small><br>
|
<strong>Tips:</strong><br>
|
||||||
• Mix text and tokens: "It's #HHMM O'Clock" or "#HH:#MM:#SS"<br>
|
• Mix text and tokens: "It's #HHMM O'clock" or "#HH:#MM:#SS"<br>
|
||||||
• Add '0' suffix for leading zeros: #TIME0, #HH0, etc.
|
• Add '0' suffix for leading zeros: #TIME0, #HH0, etc.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1226,8 +1226,8 @@
|
|||||||
gId("segments").addEventListener("change", (e) => {
|
gId("segments").addEventListener("change", (e) => {
|
||||||
const { width, height } = e.target.selectedOptions[0].dataset;
|
const { width, height } = e.target.selectedOptions[0].dataset;
|
||||||
|
|
||||||
gId("width").value = w;
|
gId("width").value = width;
|
||||||
gId("height").value = h;
|
gId("height").value = height;
|
||||||
});
|
});
|
||||||
|
|
||||||
gId("output").addEventListener("change", (e) => {
|
gId("output").addEventListener("change", (e) => {
|
||||||
@@ -1576,7 +1576,7 @@
|
|||||||
ctx.fillText(pixelId, offsetX, offsetY);
|
ctx.fillText(pixelId, offsetX, offsetY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
let i; // avoid inplicitly creating a global variable
|
||||||
switch (pattern) {
|
switch (pattern) {
|
||||||
case "1":
|
case "1":
|
||||||
i = colors;
|
i = colors;
|
||||||
|
|||||||
Reference in New Issue
Block a user