diff options
Diffstat (limited to 'js')
-rw-r--r-- | js/mapspecs.js | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/js/mapspecs.js b/js/mapspecs.js index b9d0aa4..5c4141d 100644 --- a/js/mapspecs.js +++ b/js/mapspecs.js @@ -830,10 +830,29 @@ function rgbStringToHex(rgbString) { return hexString ='#'+parts.join('').toUpperCase(); // "#0070FF"
}
+var ignoreMuteChecks = false;
+function setMute(value)
+{
+ if(!ignoreMuteChecks)
+ {
+ //Prevent changes to other checkboxes from calling this function:
+ ignoreMuteChecks = true;
+
+ //Set all other checkboxes
+ var muteButtons = document.getElementsByClassName("checkbox_mute");
+ for(var i=0; i < muteButtons.length; i++)
+ {
+ muteButtons[i].checked = value;
+ }
+ savePref('mute', value);
+
+ ignoreMuteChecks = false;
+ }
+}
function savePref(pref, value) {
- setCookie('pref_'+pref, value,31);
+ setCookie('pref_'+pref, value, 9999);
}
//Cookie functions from w3schools.com
|