Skip to content

Commit 1ce3fab

Browse files
committed
Added initial version for Firefox.
1 parent d4b5ace commit 1ce3fab

File tree

6 files changed

+36
-0
lines changed

6 files changed

+36
-0
lines changed

background.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
function saveBookmark() {
2+
browser.tabs.query({ active: true, currentWindow: true }, function(tabs) {
3+
let tab = tabs[0];
4+
let url = tab.url;
5+
6+
browser.tabs.create({
7+
url: "https://micro.blog/bookmarks?go=" + encodeURIComponent(url)
8+
});
9+
});
10+
}
11+
12+
browser.browserAction.onClicked.addListener(saveBookmark);

icons/icon-128.png

7.21 KB
Loading

icons/icon-16.png

615 Bytes
Loading

icons/icon-32.png

1.46 KB
Loading

icons/icon-64.png

3 KB
Loading

manifest.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"name": "Micro.blog",
3+
"description": "Save bookmarks to Micro.blog.",
4+
"manifest_version": 2,
5+
"version": "1.0",
6+
"permissions": [ "activeTab" ],
7+
"background": {
8+
"scripts": [ "background.js" ]
9+
},
10+
"icons": {
11+
"16": "icons/icon-16.png",
12+
"32": "icons/icon-32.png",
13+
"64": "icons/icon-64.png",
14+
"128": "icons/icon-128.png"
15+
},
16+
"browser_action": {
17+
"default_icon": {
18+
"16": "icons/icon-16.png",
19+
"32": "icons/icon-32.png",
20+
"64": "icons/icon-64.png",
21+
"128": "icons/icon-128.png"
22+
}
23+
}
24+
}

0 commit comments

Comments
 (0)