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
README.md Normal file
View file

@ -0,0 +1,13 @@
Indie Reply Button
==================
This is a WebExtension which I use to replace my bookmarklet which redirected
my browser to a form on my website with the current URL as a parameter. Sadly
because of the Content Security Policy it stopped working. The functionality
of that bookmarklet is now in this WebExtension.
To load it check it out somewhere and then open:
[about:debugging](about:debugging)
On this page you can load the plugin temporarily to test it.

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);

BIN
icons/icon-16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 257 B

BIN
icons/icon-32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 434 B

22
manifest.json Normal file
View file

@ -0,0 +1,22 @@
{
"description": "Indie Reply Button",
"manifest_version": 2,
"name": "indie-reply-button",
"version": "1.0",
"background": {
"scripts": ["background.js"]
},
"browser_action": {
"default_icon": {
"16": "icons/icon-16.png",
"32": "icons/icon-32.png"
}
},
"permissions": [
"tabs"
]
}