Complete rewrite to add likes

This commit replaces the icon with a SVG and adds the possibility
to like pages too. To do this the whole structure was rewritten
which makes it in the future easier to add new functions.
This commit is contained in:
Jeena 2018-07-26 00:05:10 +02:00
parent 760adf4d85
commit 6ca1f57d1c
9 changed files with 220 additions and 26 deletions

11
button.js Normal file
View file

@ -0,0 +1,11 @@
async function buttonClicked(e) {
const [tab] = await browser.tabs.query({currentWindow: true, active:true});
browser.tabs.create({
url: e.target.parentNode.dataset.href + tab.url
});
window.close()
}
document.addEventListener("click", buttonClicked)