| 2359 | } |
| 2360 | }, |
| 2361 | colorChange = function dom_load_documentation_colorChange():void { |
| 2362 | const options:HTMLCollectionOf<HTMLOptionElement> = colorScheme.getElementsByTagName("option"), |
| 2363 | olen:number = options.length; |
| 2364 | if (test.store === true && localStorage !== null && localStorage.getItem("settings") !== undefined && localStorage.getItem("settings") !== null && localStorage.getItem("settings").indexOf(":undefined") > 0) { |
| 2365 | localStorage.setItem("settings", localStorage.getItem("settings").replace(/:undefined/g, ":false")); |
| 2366 | } |
| 2367 | data.settings = (localStorage.getItem("settings") !== undefined && localStorage.getItem("settings") !== null) |
| 2368 | ? JSON.parse(localStorage.getItem("settings")) |
| 2369 | : {}; |
| 2370 | if (colorParam.indexOf("c=") === 0 || colorParam.indexOf("&c=") > -1) { |
| 2371 | if (colorParam.indexOf("&c=") > -1) { |
| 2372 | colorParam.substr(colorParam.indexOf("&c=") + 1); |
| 2373 | } |
| 2374 | colorParam = colorParam.split("&")[0]; |
| 2375 | colorParam = colorParam.substr(colorParam.indexOf("=") + 1); |
| 2376 | b = 0; |
| 2377 | do { |
| 2378 | if (options[b].value.toLowerCase() === colorParam) { |
| 2379 | colorScheme.selectedIndex = b; |
| 2380 | break; |
| 2381 | } |
| 2382 | b = b + 1; |
| 2383 | } while (b < olen); |
| 2384 | } |
| 2385 | if (((olen > 0 && b !== olen) || olen === 0) && data.settings["option-color"] !== undefined) { |
| 2386 | colorScheme.selectedIndex = data.settings["option-color"]; |
| 2387 | } |
| 2388 | method |
| 2389 | .event |
| 2390 | .colorScheme(null); |
| 2391 | colorScheme.onchange = method.event.colorScheme; |
| 2392 | }; |
| 2393 | b = docbuttons.length; |
| 2394 | a = 0; |
| 2395 | do { |