-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathoptions.js
4 lines (4 loc) · 1.79 KB
/
options.js
1
2
3
4
var presetOn=$("#presetOn"),presetOff=$("#presetOff"),volumePresetOn=$("#volumePresetOn"),volumePresetOff=$("#volumePresetOff"),fullScreenOn=$("#fullScreenOn"),fullScreenOff=$("#fullScreenOff"),openOn=$("#openOn"),openOff=$("#openOff"),infoFld=$("#info");openOn.on("click",function(){Methods.save("autoOpen","false")});openOff.on("click",function(){Methods.save("autoOpen","true")});fullScreenOff.on("click",function(){Methods.save("fullScreen","false")});
fullScreenOn.on("click",function(){Methods.save("fullScreen","true")});presetOff.on("click",function(){Methods.save("autoLoadPreset","false");Methods.save("volumePresetVal",1)});presetOn.on("click",function(){Methods.save("autoLoadPreset","true")});volumePresetOff.on("click",function(){Methods.save("volumePreset","false");Methods.save("volumePresetVal",1)});volumePresetOn.on("click",function(){Methods.save("volumePreset","true")});
infoFld.on("click",function(){"true"!=Methods.load("info")?Methods.save("info","true"):Methods.save("info","false")});"true"!=Methods.load("info")?infoFld[0].checked=!1:infoFld[0].checked=!0;"true"!=Methods.load("autoOpen")?openOn.click():openOff.click();"true"!=Methods.load("autoLoadPreset")?presetOff.click():presetOn.click();"true"!=Methods.load("volumePreset")?volumePresetOff.click():volumePresetOn.click();"true"!=Methods.load("fullScreen")?fullScreenOff.click():fullScreenOn.click();$("#infoIconLabel").html(chrome.i18n.getMessage("infoIconLabel"));
$("#openOnClick").html(chrome.i18n.getMessage("openOnClick"));$("#loadPresetOnStartup").html(chrome.i18n.getMessage("loadPresetOnStartup"));$("#fullScreenMode").html(chrome.i18n.getMessage("fullScreenMode"));$("#saveVolumeWithPreset").html(chrome.i18n.getMessage("saveVolumeWithPreset"));$(".on").html(chrome.i18n.getMessage("on"));$(".off").html(chrome.i18n.getMessage("off"));