mirror of
https://github.com/wled/WLED.git
synced 2025-07-19 16:56:35 +00:00
add onload event to body
This commit is contained in:
parent
5cd8f5681e
commit
0a91d60677
@ -9,7 +9,7 @@
|
|||||||
<title>WLED</title>
|
<title>WLED</title>
|
||||||
<link rel="stylesheet" href="index.css">
|
<link rel="stylesheet" href="index.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body onload="onLoad()">
|
||||||
|
|
||||||
<div id="cv" class="overlay">Loading WLED UI...</div>
|
<div id="cv" class="overlay">Loading WLED UI...</div>
|
||||||
<noscript><div class="overlay" style="opacity:1;">Sorry, WLED UI needs JavaScript!</div></noscript>
|
<noscript><div class="overlay" style="opacity:1;">Sorry, WLED UI needs JavaScript!</div></noscript>
|
||||||
|
@ -24,7 +24,7 @@ var pN = "", pI = 0, pNum = 0;
|
|||||||
var pmt = 1, pmtLS = 0, pmtLast = 0;
|
var pmt = 1, pmtLS = 0, pmtLast = 0;
|
||||||
var lastinfo = {};
|
var lastinfo = {};
|
||||||
var isM = false, mw = 0, mh=0;
|
var isM = false, mw = 0, mh=0;
|
||||||
var ws, cpick, wsRpt=0;
|
var ws, wsRpt=0;
|
||||||
var cfg = {
|
var cfg = {
|
||||||
theme:{base:"dark", bg:{url:"", rnd: false, rndGrayscale: false, rndBlur: false}, alpha:{bg:0.6,tab:0.8}, color:{bg:""}},
|
theme:{base:"dark", bg:{url:"", rnd: false, rndGrayscale: false, rndBlur: false}, alpha:{bg:0.6,tab:0.8}, color:{bg:""}},
|
||||||
comp :{colors:{picker: true, rgb: false, quick: true, hex: false},
|
comp :{colors:{picker: true, rgb: false, quick: true, hex: false},
|
||||||
@ -40,7 +40,7 @@ var hol = [
|
|||||||
[0,0,1,1,"https://images.alphacoders.com/119/1198800.jpg"] // new year
|
[0,0,1,1,"https://images.alphacoders.com/119/1198800.jpg"] // new year
|
||||||
];
|
];
|
||||||
|
|
||||||
cpick = new iro.ColorPicker("#picker", {
|
var cpick = new iro.ColorPicker("#picker", {
|
||||||
width: 260,
|
width: 260,
|
||||||
wheelLightness: false,
|
wheelLightness: false,
|
||||||
wheelAngle: 270,
|
wheelAngle: 270,
|
||||||
@ -50,8 +50,6 @@ cpick = new iro.ColorPicker("#picker", {
|
|||||||
options: {}
|
options: {}
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
cpick.on("input:end", () => {setColor(1);});
|
|
||||||
cpick.on("color:change", () => {updatePSliders()});
|
|
||||||
|
|
||||||
function handleVisibilityChange() {if (!d.hidden && new Date () - lastUpdate > 3000) requestJson();}
|
function handleVisibilityChange() {if (!d.hidden && new Date () - lastUpdate > 3000) requestJson();}
|
||||||
function sCol(na, col) {d.documentElement.style.setProperty(na, col);}
|
function sCol(na, col) {d.documentElement.style.setProperty(na, col);}
|
||||||
@ -274,6 +272,8 @@ function onLoad()
|
|||||||
|
|
||||||
selectSlot(0);
|
selectSlot(0);
|
||||||
updateTablinks(0);
|
updateTablinks(0);
|
||||||
|
cpick.on("input:end", () => {setColor(1);});
|
||||||
|
cpick.on("color:change", () => {updatePSliders()});
|
||||||
pmtLS = localStorage.getItem('wledPmt');
|
pmtLS = localStorage.getItem('wledPmt');
|
||||||
|
|
||||||
// Load initial data
|
// Load initial data
|
||||||
|
Loading…
x
Reference in New Issue
Block a user