mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 02:31:45 +00:00
lint
This commit is contained in:
@ -48,5 +48,5 @@ body {
|
||||
|
||||
.minus,
|
||||
.plus {
|
||||
background:rgb(0, 0, 0);
|
||||
}
|
||||
background: rgb(0, 0, 0);
|
||||
}
|
||||
|
||||
@ -80,13 +80,9 @@ select#data {
|
||||
}
|
||||
|
||||
/* Counter mode css */
|
||||
|
||||
span {
|
||||
cursor: pointer;
|
||||
}
|
||||
.number {
|
||||
margin: 100px;
|
||||
}
|
||||
.minus,
|
||||
.plus {
|
||||
user-select: none;
|
||||
@ -100,13 +96,3 @@ span {
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
}
|
||||
.inputt {
|
||||
height: 34px;
|
||||
width: 100px;
|
||||
text-align: center;
|
||||
font-size: 26px;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 4px;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
const fs = require("fs");
|
||||
const {ipcRenderer} = require("electron");
|
||||
const { ipcRenderer } = require("electron");
|
||||
|
||||
let promptId = null;
|
||||
let promptOptions = null;
|
||||
|
||||
function $(selector) {return document.querySelector(selector)}
|
||||
function $(selector) { return document.querySelector(selector) }
|
||||
|
||||
document.addEventListener( 'DOMContentLoaded', promptRegister);
|
||||
document.addEventListener('DOMContentLoaded', promptRegister);
|
||||
|
||||
function promptRegister() {
|
||||
//get custom session id
|
||||
@ -71,7 +71,6 @@ function promptRegister() {
|
||||
return promptError(`Unhandled input type '${promptOptions.type}'`);
|
||||
}
|
||||
if (promptOptions.type === "counter") {
|
||||
dataElement.classList.add("input");
|
||||
dataElement.style.width = "unset";
|
||||
dataElement.style["text-align"] = "center";
|
||||
//dataElement.style["min-height"] = "1.5em";
|
||||
@ -215,7 +214,7 @@ function createMinus(dataElement) {
|
||||
minus.textContent = "-";
|
||||
minus.classList.add("minus");
|
||||
minus.onmousedown = () => {
|
||||
dataElement.value = validateCounterInput(parseInt(dataElement.value) - 1);
|
||||
dataElement.value = validateCounterInput(parseInt(dataElement.value) - 1);
|
||||
};
|
||||
return minus;
|
||||
}
|
||||
@ -233,7 +232,7 @@ function createPlus(dataElement) {
|
||||
//validate counter
|
||||
function validateCounterInput(input) {
|
||||
const min = promptOptions.counterOptions?.minimum,
|
||||
max = promptOptions.counterOptions?.maximum;
|
||||
max = promptOptions.counterOptions?.maximum;
|
||||
if (min !== undefined && input < min) {
|
||||
return min;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user