()
| 415 | } |
| 416 | |
| 417 | function bindWindow() { |
| 418 | for (var w in windowbinds) { |
| 419 | $(w).addEventListener("click", function(e) { |
| 420 | if (state.cw === this.id) |
| 421 | return; |
| 422 | if (window.isDebugRunning()) { |
| 423 | |
| 424 | } |
| 425 | state.cw = this.id; |
| 426 | for (var win in windowbinds) { |
| 427 | $(win).className = "button"; |
| 428 | if ($(windowbinds[win].id) && !windowbinds[win].opacityOnly) { |
| 429 | $(windowbinds[win].id).style.display = "none"; |
| 430 | } else if ($(windowbinds[win].id) && windowbinds[win].opacityOnly) { |
| 431 | $(windowbinds[win].id).style.opacity = "0"; |
| 432 | } |
| 433 | } |
| 434 | this.className = "button active"; |
| 435 | try { |
| 436 | $(windowbinds[this.id].id).style.display = ""; |
| 437 | $(windowbinds[this.id].id).style.opacity = "1"; |
| 438 | } catch (e) { |
| 439 | console.log(e); |
| 440 | } |
| 441 | }); |
| 442 | } |
| 443 | }; |
| 444 | |
| 445 | function bindTests() { |
| 446 | for (var test in tests) { |
no test coverage detected