(checkboxId, titlebar_name, titlebar_icon_url, titlebar_text)
| 27 | } |
| 28 | |
| 29 | function initCheckbox(checkboxId, titlebar_name, titlebar_icon_url, titlebar_text) { |
| 30 | var elem = document.getElementById(checkboxId); |
| 31 | if (!elem) |
| 32 | return; |
| 33 | elem.onclick = function() { |
| 34 | if (document.getElementById(checkboxId).checked) |
| 35 | addTitlebar(titlebar_name, titlebar_icon_url, titlebar_text); |
| 36 | else |
| 37 | removeTitlebar(titlebar_name); |
| 38 | focusTitlebars(true); |
| 39 | |
| 40 | updateContentStyle(); |
| 41 | updateCheckbox(); |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | window.onfocus = function() { |
| 46 | console.log("focus"); |
no test coverage detected