msgid "Flash light duration"
msgstr "Durée du flash laser"
+
+msgid "Flash light color"
+msgstr "Couleur du flash laser"
<input type="number" size="4" min="500" max="5000" step="100" id="flash-light-duration"/>
<span data-l10n="text-content">Flash light duration</span>
<span data-l10n="text-content">(ms)</span>
+ </label></p>
+ <p><label>
+ <input type="text" size="6" id="flash-light-color"/>
+ <span data-l10n="text-content">Flash light color</span>
</label></p>
</div>
</div>
setConf("APP_PATH", "");
setConf("DOUBLE_TAP_DURATION", 1000);
setConf("FLASH_LIGHT_DURATION", 1500);
+ setConf("FLASH_LIGHT_COLOR", "#E3E");
const _ = (window.libD && libD.l10n) ? libD.l10n() : function (s) {
return s;
document.getElementById("flash-light-duration").value;
};
}
+
+ if (!Object.prototype.hasOwnProperty.call(localStorage, "flashLightColor")) {
+ localStorage.flashLightColor = Conf.FLASH_LIGHT_COLOR;
+ }
+ const flashLightColor = document.getElementById("flash-light-color");
+ if (flashLightColor) {
+ flashLightColor.value = localStorage.flashLightColor;
+ flashLightColor.onchange = function () {
+ localStorage.flashLightColor =
+ document.getElementById("flash-light-color").value;
+ var style = document.createElement('style')
+ style.innerHTML = ".highlight {background-color: " + localStorage.flashLightColor + ";}";
+ document.body.appendChild(style);
+ };
+ flashLightColor.onchange();
+ }
}
function repromptName(f) {