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
README.md
Normal file
13
README.md
Normal 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
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);
|
BIN
icons/icon-16.png
Normal file
BIN
icons/icon-16.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 257 B |
BIN
icons/icon-32.png
Normal file
BIN
icons/icon-32.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 434 B |
22
manifest.json
Normal file
22
manifest.json
Normal 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"
|
||||||
|
]
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue