diff options
| author | Stephen Blott | 2016-03-04 10:21:13 +0000 |
|---|---|---|
| committer | Stephen Blott | 2016-03-04 10:21:13 +0000 |
| commit | 58e332fe942d01c8f4633b3415c460f678b2c75b (patch) | |
| tree | 4c7b8c7dd99c632f98c831ff4e7b532e60c08880 | |
| parent | 2beb94559937a9b97c5d11d24006d84931cdd4a1 (diff) | |
| download | vimium-58e332fe942d01c8f4633b3415c460f678b2c75b.tar.bz2 | |
Use role/link to make command names clickable.
| -rw-r--r-- | content_scripts/link_hints.coffee | 1 | ||||
| -rw-r--r-- | pages/help_dialog.coffee | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/content_scripts/link_hints.coffee b/content_scripts/link_hints.coffee index e74653f2..c8f9b6f9 100644 --- a/content_scripts/link_hints.coffee +++ b/content_scripts/link_hints.coffee @@ -205,7 +205,6 @@ class LinkHintsMode if (element.hasAttribute("onclick") or element.getAttribute("role")?.toLowerCase() in ["button", "link"] or element.getAttribute("class")?.toLowerCase().indexOf("button") >= 0 or - element.getAttribute("class")?.indexOf("vimiumClickable") >= 0 or element.getAttribute("contentEditable")?.toLowerCase() in ["", "contentEditable", "true"]) isClickable = true diff --git a/pages/help_dialog.coffee b/pages/help_dialog.coffee index 0589e379..0da4977b 100644 --- a/pages/help_dialog.coffee +++ b/pages/help_dialog.coffee @@ -42,7 +42,7 @@ HelpDialog = # clicked with link hints). for element in @dialogElement.getElementsByClassName "commandName" do (element) -> - element.classList.add "vimiumClickable" + element.setAttribute "role", "link" element.addEventListener "click", -> commandName = element.textContent.replace("(","").replace ")", "" chrome.runtime.sendMessage handler: "copyToClipboard", data: commandName |
