Initial commit
The first version of the plugin with a hard coded url to my website.
This commit is contained in:
commit
760adf4d85
5 changed files with 48 additions and 0 deletions
13
background.js
Normal file
13
background.js
Normal 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);
|
Loading…
Add table
Add a link
Reference in a new issue