3 lines
599 B
JavaScript
3 lines
599 B
JavaScript
const s=document.getElementById("factor"),r=document.getElementById("threshold"),n=document.getElementById("save");chrome.storage.sync.get({brightnessFactor:.9,brightnessThreshold:200},e=>{s.value=String(e.brightnessFactor),r.value=String(e.brightnessThreshold)});n.addEventListener("click",()=>{const e=parseFloat(s.value),t=parseInt(r.value,10);!isNaN(e)&&e>=0&&e<=1&&!isNaN(t)&&t>=0&&t<=255?chrome.storage.sync.set({brightnessFactor:e,brightnessThreshold:t},()=>{alert("Saved!")}):alert("올바른 값을 입력해주세요. (Factor 0~1, Threshold 0~255)")});
|
|
//# sourceMappingURL=options.js.map
|