diff --git a/popup.html b/popup.html index 1ad702d7..acaa48ec 100644 --- a/popup.html +++ b/popup.html @@ -14,6 +14,7 @@ cursor: default; font-weight: bold; margin-bottom: 2px; + display: block; } .actions { font-size: x-small; diff --git a/popup.js b/popup.js index 463e567f..cc4bf1a1 100644 --- a/popup.js +++ b/popup.js @@ -1,5 +1,5 @@ var styleTemplate = document.createElement("div"); -styleTemplate.innerHTML = "
" + t('enableStyleLabel') + " " + t('disableStyleLabel') + " " + t('editStyleLabel') + " " + t('deleteStyleLabel') + "
"; +styleTemplate.innerHTML = "
" + t('enableStyleLabel') + " " + t('disableStyleLabel') + " " + t('editStyleLabel') + " " + t('deleteStyleLabel') + "
"; var writeStyleTemplate = document.createElement("a"); writeStyleTemplate.className = "write-style-link"; @@ -100,12 +100,14 @@ function showStyles(styles) { function createStyleElement(style) { var e = styleTemplate.cloneNode(true); var checkbox = e.querySelector(".checker"); + checkbox.id = "style-" + style.id; checkbox.checked = style.enabled == "true"; e.setAttribute("class", "entry " + (style.enabled == "true" ? "enabled" : "disabled")); e.setAttribute("style-id", style.id); var styleName = e.querySelector(".style-name"); styleName.appendChild(document.createTextNode(style.name)); + styleName.setAttribute("for", "style-" + style.id); var editLink = e.querySelector(".style-edit-link"); editLink.setAttribute("href", editLink.getAttribute("href") + style.id); editLink.addEventListener("click", openLinkInTabOrWindow, false);