fix ImageQuality compatibility

This commit is contained in:
csf
2022-06-27 22:24:56 +08:00
parent a7769da317
commit 47469dd971
5 changed files with 53 additions and 28 deletions

View File

@@ -336,13 +336,13 @@ class Header: Reactor.Component {
function handle_custom_image_quality() {
var tmp = handler.get_custom_image_quality();
var bitrate = (tmp[0] || 100) / 2;
var bitrate = (tmp[0] || 50);
msgbox("custom", "Custom Image Quality", "<div .form> \
<div><input type=\"hslider\" style=\"width: 50%\" name=\"bitrate\" max=\"100\" min=\"10\" value=\"" + bitrate + "\"/ buddy=\"bitrate-buddy\"><b #bitrate-buddy>x</b>% Bitrate</div> \
</div>", function(res=null) {
if (!res) return;
if (!res.bitrate) return;
handler.save_custom_image_quality(res.bitrate * 2);
handler.save_custom_image_quality(res.bitrate);
toggleMenuState();
});
}