| 2327 | }, |
| 2328 | colorScheme:HTMLSelectElement = id("option-color"), |
| 2329 | hashgo = function dom_load_documentation_hashgo():void { |
| 2330 | let hash:string = "", |
| 2331 | test:boolean = false, |
| 2332 | hashnode:HTMLElement, |
| 2333 | parent:HTMLElement; |
| 2334 | const body:HTMLBodyElement = document.getElementsByTagName("body")[0]; |
| 2335 | if (location.href.indexOf("#") > 0) { |
| 2336 | hash = location |
| 2337 | .href |
| 2338 | .split("#")[1]; |
| 2339 | hashnode = document.getElementById(hash); |
| 2340 | if (hashnode !== null) { |
| 2341 | parent = <HTMLElement>hashnode.parentNode; |
| 2342 | test = (parent.nodeName.toLowerCase() === "h2" || parent.getAttribute("class") === "content-hide"); |
| 2343 | if (test === true) { |
| 2344 | parent = <HTMLElement>parent.parentNode; |
| 2345 | parent.getElementsByTagName("button")[0].click(); |
| 2346 | } else { |
| 2347 | do { |
| 2348 | parent = <HTMLElement>parent.parentNode; |
| 2349 | test = (parent.nodeName.toLowerCase() === "h2" || parent.getAttribute("class") === "content-hide"); |
| 2350 | } while (test === false && parent.nodeName.toLowerCase() !== "body"); |
| 2351 | if (test === true) { |
| 2352 | parent = <HTMLElement>parent.parentNode; |
| 2353 | parent.getElementsByTagName("button")[0].click(); |
| 2354 | } |
| 2355 | } |
| 2356 | document.documentElement.scrollTop = hashnode.offsetTop; |
| 2357 | body.scrollTop = hashnode.offsetTop; |
| 2358 | } |
| 2359 | } |
| 2360 | }, |
| 2361 | colorChange = function dom_load_documentation_colorChange():void { |
| 2362 | const options:HTMLCollectionOf<HTMLOptionElement> = colorScheme.getElementsByTagName("option"), |
| 2363 | olen:number = options.length; |