From 6abe145a8c6ff7ea5806e54122fd8d747f45b4b7 Mon Sep 17 00:00:00 2001 From: SmAsHeD <6071159+smashedr@users.noreply.github.com> Date: Mon, 14 Oct 2024 15:05:14 -0700 Subject: [PATCH] Add Copy All Links from CTX Menu (#106) --- manifest.json | 14 ++++- package-lock.json | 8 +-- package.json | 2 +- src/html/options.html | 51 +++++++++++++----- src/js/exports.js | 70 +++++++++++++++---------- src/js/extract.js | 3 +- src/js/links.js | 1 + src/js/options.js | 48 ++++++++++++----- src/js/popup.js | 2 +- src/js/service-worker.js | 108 +++++++++++++++++++++++++++------------ tests/common.js | 1 + 11 files changed, 215 insertions(+), 93 deletions(-) diff --git a/manifest.json b/manifest.json index dabeb63..f41d766 100644 --- a/manifest.json +++ b/manifest.json @@ -12,11 +12,23 @@ }, "description": "Show Main Popup Action" }, - "extract": { + "extractAll": { "suggested_key": { "default": "Alt+Shift+X" }, "description": "Extract Links from Tab(s)" + }, + "extractSelection": { + "description": "Extract Links from Selected Text" + }, + "copyAll": { + "suggested_key": { + "default": "Alt+Shift+C" + }, + "description": "Copy Links from Tab(s)" + }, + "copySelection": { + "description": "Copy Links from Selected Text" } }, "omnibox": { diff --git a/package-lock.json b/package-lock.json index 1c588eb..6cf9096 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,7 @@ "pdfjs-dist": "^4.7.76" }, "devDependencies": { - "@types/chrome": "^0.0.277", + "@types/chrome": "^0.0.278", "eslint": "^8.57.0", "gulp": "^4.0.2", "json-merger": "^1.1.10", @@ -553,9 +553,9 @@ "license": "MIT" }, "node_modules/@types/chrome": { - "version": "0.0.277", - "resolved": "https://registry.npmjs.org/@types/chrome/-/chrome-0.0.277.tgz", - "integrity": "sha512-qoTgBcDWblSsX+jvFnpUlLUE3LAuOhZfBh9MyMWMQHDsQiYVgBvdZWu9COrdB9+aNnInEyXcFgfc2HE16sdSYQ==", + "version": "0.0.278", + "resolved": "https://registry.npmjs.org/@types/chrome/-/chrome-0.0.278.tgz", + "integrity": "sha512-PDIJodOu7o54PpSOYLybPW/MDZBCjM1TKgf31I3Q/qaEbNpIH09rOM3tSEH3N7Q+FAqb1933LhF8ksUPYeQLNg==", "dev": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 1a28c5c..b7f0085 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "pdfjs-dist": "^4.7.76" }, "devDependencies": { - "@types/chrome": "^0.0.277", + "@types/chrome": "^0.0.278", "eslint": "^8.57.0", "gulp": "^4.0.2", "json-merger": "^1.1.10", diff --git a/src/html/options.html b/src/html/options.html index 334abc3..9f53844 100644 --- a/src/html/options.html +++ b/src/html/options.html @@ -26,17 +26,36 @@
v
-Description | Shortcut |
---|---|
- | Unknown | -
Description | Shortcut |
---|---|
+ | Unknown | +