diff --git a/beastify/popup/choose_beast.css b/beastify/popup/choose_beast.css index db4c5a5..9bc6650 100644 --- a/beastify/popup/choose_beast.css +++ b/beastify/popup/choose_beast.css @@ -6,26 +6,25 @@ html, body { display: none; } -.button { +button { + border: none; + width: 100%; margin: 3% auto; padding: 4px; text-align: center; font-size: 1.5em; cursor: pointer; -} - -.beast:hover { - background-color: #CFF2F2; -} - -.beast { background-color: #E5F2F2; } -.reset { +button:hover { + background-color: #CFF2F2; +} + +button[type="reset"] { background-color: #FBFBC9; } -.reset:hover { +button[type="reset"]:hover { background-color: #EAEA9D; } diff --git a/beastify/popup/choose_beast.html b/beastify/popup/choose_beast.html index 5f68622..b52492a 100644 --- a/beastify/popup/choose_beast.html +++ b/beastify/popup/choose_beast.html @@ -8,10 +8,10 @@
Can't beastify this web page.
Try a different page.
diff --git a/beastify/popup/choose_beast.js b/beastify/popup/choose_beast.js index 71f9adf..4c521e9 100644 --- a/beastify/popup/choose_beast.js +++ b/beastify/popup/choose_beast.js @@ -65,15 +65,14 @@ function listenForClicks() { * Get the active tab, * then call "beastify()" or "reset()" as appropriate. */ - if (e.target.classList.contains("beast")) { - browser.tabs.query({active: true, currentWindow: true}) - .then(beastify) - .catch(reportError); - } - else if (e.target.classList.contains("reset")) { + if (e.target.type === "reset") { browser.tabs.query({active: true, currentWindow: true}) .then(reset) .catch(reportError); + } else { + browser.tabs.query({active: true, currentWindow: true}) + .then(beastify) + .catch(reportError); } }); }