indie-reply-button/button.js
Jeena 6ca1f57d1c 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.
2018-07-26 00:08:10 +02:00

11 lines
278 B
JavaScript

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)