1 // Cancels the outline elements
2 function webdeveloper_cancelOutlineElements()
4 window
.opener
.document
.getElementById("webdeveloper-outline-custom-elements-menu").checked
= false;
9 // Initializes the outline elements dialog
10 function webdeveloper_initializeOutlineElements()
15 // Loop through the possible custom elements
16 for(var i
= 1; i
<= 5; i
++)
18 color
= "webdeveloper.custom." + i
+ ".color";
19 element
= "webdeveloper.custom." + i
+ ".element";
21 // If the color is set
22 if(webdeveloper_isPreferenceSet(color
))
24 document
.getElementById(color
).color
= webdeveloper_getStringPreference(color
, true);
27 // If the element is set
28 if(webdeveloper_isPreferenceSet(element
))
30 document
.getElementById(element
).value
= webdeveloper_getStringPreference(element
, true);
35 // Saves the list of colors and elements to outline
36 function webdeveloper_saveOutlineElements()
41 // Loop through the possible custom elements
42 for(var i
= 1; i
<= 5; i
++)
44 color
= "webdeveloper.custom." + i
+ ".color";
45 element
= "webdeveloper.custom." + i
+ ".element";
47 webdeveloper_setStringPreference(color
, document
.getElementById(color
).color
);
48 webdeveloper_setStringPreference(element
, document
.getElementById(element
).value
.trim());
51 window
.arguments
[0].push(true);