blob: eb16b4d62fd98802fd2cf0f148b347855b8e6437 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
function setDisableState(id, state) {
var component = document.getElementById(id);
var preference = component.getAttribute("preference");
var isLocked = document.getElementById(preference).locked;
component.disabled = isLocked || state;
}
function changeDisabledState(state) {
//Set the states of the groupbox children state based on the "javascript enabled" checkbox value
setDisableState("allowWindowMoveResize", state);
setDisableState("allowWindowStatusChange", state);
setDisableState("allowWindowFlip", state);
setDisableState("allowHideStatusBar", state);
setDisableState("allowContextmenuDisable", state);
}
function javascriptEnabledChange() {
var javascriptDisabled = !document.getElementById('javascript.enabled').value;
changeDisabledState(javascriptDisabled);
}
function Startup() {
javascriptEnabledChange();
}
|