Skip to content

Commit

Permalink
Add image source dumping
Browse files Browse the repository at this point in the history
See #21
  • Loading branch information
aledeg committed Feb 21, 2019
1 parent 30f9d0d commit ca23ceb
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 6 deletions.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ On [addons.mozilla.org](https://addons.mozilla.org/firefox/addon/linkdump).

Linkdump is a Firefox extension which allows you to store links, URL, and bookmarks
in the local storage until you are ready to dump them in a file or copy them in the
clipboard. At the moment, raw text files, markdown files, and HTML files are supported.
clipboard. At the moment, the following link formats are supported:
- text
- markdown
- HTML
- dokuwiki
- phpbb.

## How do I add entries in the storage?

Expand All @@ -18,6 +23,8 @@ following are available:
available in the address bar.
1. Link are added by clicking the ![Linkdump icon](icons/linkdump-16.png) icon
available in the link context menu.
1. Image source are added by clicking the ![Linkdump icon](icons/linkdump-16.png)
icon available in the image context menu.
1. Bookmarks are added by clicking the ![Linkdump icon](icons/linkdump-16.png)
icon available in the bookmark context menu
1. Bookmark folders are added recursively by clicking the
Expand Down
8 changes: 6 additions & 2 deletions background.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ function handleMessage(message) {
browser.menus.create({
id: linkAddId,
title: browser.i18n.getMessage('menuAddToDump'),
contexts: ['link']
contexts: ['link', 'image']
});

browser.menus.create({
Expand All @@ -186,7 +186,11 @@ browser.menus.create({
browser.menus.onClicked.addListener(info => {
switch (info.menuItemId) {
case linkAddId:
addLink({ url: info.linkUrl, title: info.linkText});
if (info.linkUrl != undefined) {
addLink({ url: info.linkUrl, title: info.linkText});
} else {
addLink({ url: info.srcUrl, title: info.srcUrl});
}
break;
case bookmarkAddId:
addBookmark(info.bookmarkId);
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

"manifest_version": 2,
"name": "LinkDump",
"version": "1.7",
"version": "1.8",
"description": "__MSG_extensionDescription__",
"icons": {
"48": "icons/linkdump-48.png"
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "linkdump",
"version": "1.7.0",
"version": "1.8.0",
"description": "Store links and dump them",
"main": "background.js",
"scripts": {
Expand Down

0 comments on commit ca23ceb

Please sign in to comment.