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:
parent
760adf4d85
commit
6ca1f57d1c
9 changed files with 220 additions and 26 deletions
11
button.js
Normal file
11
button.js
Normal 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)
|
Loading…
Add table
Add a link
Reference in a new issue