-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathoptions.xul
69 lines (61 loc) · 4.2 KB
/
options.xul
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?xml version="1.0"?>
<!DOCTYPE vbox SYSTEM "chrome://greasyscripts/locale/options.dtd">
<vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<setting type="menulist" pref="extensions.greasyscripts.provider" title="&provider;" class="greasyscripts_setting"
onpreferencechanged="var val = Services.prefs.getCharPref(this.pref);
window.setTimeout(function(val) {
var highlight = document.getElementById('highlight');
if (val == 'native') highlight.setAttribute('style','display:none');
else highlight.removeAttribute('style');}, 0, val)">
<menulist>
<menupopup onpopupshowing="Cu.import('chrome://greasyscripts/content/preferences.jsm');
if (!preferences.providersAvailable['greasemonkey']) this.childNodes[1].setAttribute('disabled','true');
if (!preferences.providersAvailable['scriptish']) this.childNodes[2].setAttribute('disabled','true');">
<menuitem value="native" label="&provider.native;"/>
<menuitem value="greasemonkey" label="Greasemonkey"/>
<menuitem value="scriptish" label="Scriptish"/>
</menupopup>
</menulist>
</setting>
<setting id="highlight" type="control" title="&highlight;" class="greasyscripts_setting">
<setting type="bool" pref="extensions.greasyscripts.highlight" class="greasyscripts_setting"/>
<setting type="color" pref="extensions.greasyscripts.highlight.color" title="&highlight.color; ⇒" class="greasyscripts_setting"/>
</setting>
<setting type="control" class="greasyscripts_setting"/>
<setting type="menulist" pref="extensions.greasyscripts.mode" title="&mode;" class="greasyscripts_setting"
onpreferencechanged="var val = Services.prefs.getIntPref(this.pref); var highlight = document.getElementById('highlight');
if (val == 1) {highlight.removeAttribute('disabled'); highlight.childNodes[0].removeAttribute('disabled'); highlight.childNodes[1].removeAttribute('disabled')}
else {highlight.setAttribute('disabled',true); highlight.childNodes[0].setAttribute('disabled',true); highlight.childNodes[1].setAttribute('disabled',true);}">
<menulist>
<menupopup>
<menuitem value="1" label="&mode.1;"/>
<menuitem value="2" label="&mode.2;"/>
<menuitem value="3" label="&mode.3;"/>
</menupopup>
</menulist>
</setting>
<setting type="control" class="greasyscripts_setting"/>
<setting type="bool" pref="extensions.greasyscripts.cache.enabled" title="&cache;" class="greasyscripts_setting"
onpreferencechanged="var val = Services.prefs.getBoolPref(this.pref);
window.setTimeout(function(val) {
var lifetime = document.getElementById('lifetime');
if (val) {lifetime.removeAttribute('disabled'); lifetime.childNodes[0].removeAttribute('disabled'); lifetime.childNodes[1].firstChild.removeAttribute('disabled');}
else {lifetime.setAttribute('disabled',true); lifetime.childNodes[0].setAttribute('disabled',true); lifetime.childNodes[1].firstChild.setAttribute('disabled',true);}}, 0, val)"/>
<setting id="lifetime" type="control" title="&cache.lifetime;" class="greasyscripts_setting">
<setting type="integer" pref="extensions.greasyscripts.cache.max_age.number"/>
<setting type="menulist" pref="extensions.greasyscripts.cache.max_age.unit">
<menulist>
<menupopup>
<menuitem value="milliseconds" label="&cache.unit.milliseconds;" hidden="true"/>
<menuitem value="seconds" label="&cache.unit.seconds;" hidden="true"/>
<menuitem value="minutes" label="&cache.unit.minutes;" hidden="true"/>
<menuitem value="hours" label="&cache.unit.hours;"/>
<menuitem value="days" label="&cache.unit.days;"/>
<menuitem value="weeks" label="&cache.unit.weeks;"/>
<menuitem value="months" label="&cache.unit.months;" hidden="true"/>
<menuitem value="years" label="&cache.unit.years;" hidden="true"/>
</menupopup>
</menulist>
</setting>
</setting>
</vbox>