1 function licenseSelectorCheck() {
2 var selector
= document
.getElementById("wpLicense");
3 if (selector
.selectedIndex
> 0 &&
4 selector
.options
[selector
.selectedIndex
].value
== "" ) {
5 // Browser is broken, doesn't respect disabled attribute on <option>
6 selector
.selectedIndex
= 0;
10 function licenseSelectorFixup() {
11 // for MSIE/Mac; non-breaking spaces cause the <option> not to render
12 // but, for some reason, setting the text to itself works
13 var selector
= document
.getElementById("wpLicense");
14 var ua
= navigator
.userAgent
;
15 var isMacIe
= (ua
.indexOf("MSIE") != -1) && (ua
.indexOf("Mac") != -1);
17 for (var i
= 0; i
< selector
.options
.length
; i
++) {
18 selector
.options
[i
].text
= selector
.options
[i
].text
;
23 addOnloadHook(licenseSelectorFixup
);