Initial commit

The first version of the plugin with a hard coded url to my website.
This commit is contained in:
Jeena 2018-01-29 19:03:39 +01:00
commit 760adf4d85
5 changed files with 48 additions and 0 deletions

13
background.js Normal file
View file

@ -0,0 +1,13 @@
function openPage(url) {
browser.tabs.create({
url: "https://jeena.net/notes/new?in_reply_to=" + url
});
}
async function buttonClicked() {
const [tab] = await browser.tabs.query({currentWindow: true, active:true});
console.log(tab)
openPage(tab.url);
}
browser.browserAction.onClicked.addListener(buttonClicked);