(button_id, button_name, normal_image_url,
hover_image_url, click_func)
| 16 | } |
| 17 | |
| 18 | function createButton(button_id, button_name, normal_image_url, |
| 19 | hover_image_url, click_func) { |
| 20 | var button = document.createElement("div"); |
| 21 | button.setAttribute("class", button_name); |
| 22 | var button_img = createImage(button_id, normal_image_url); |
| 23 | button.appendChild(button_img); |
| 24 | button.onmouseover = function() { |
| 25 | updateImageUrl(button_id, hover_image_url); |
| 26 | } |
| 27 | button.onmouseout = function() { |
| 28 | updateImageUrl(button_id, normal_image_url); |
| 29 | } |
| 30 | button.onclick = click_func; |
| 31 | return button; |
| 32 | } |
| 33 | |
| 34 | function focusTitlebars(focus) { |
| 35 | var bg_color = focus ? "#3a3d3d" : "#7a7c7c"; |
no test coverage detected