From 162e14585564701d034605dfda33784a5b601329 Mon Sep 17 00:00:00 2001 From: SmAsHeD <6071159+smashedr@users.noreply.github.com> Date: Sat, 28 Oct 2023 13:37:15 -0700 Subject: [PATCH] Add Open Links Feature (#14) * Add Open Links Feature * Tweak Open Links and Cleanup * Add Parse Links and Cleanup * Make Extra Text on Links Not Selectable * Update README.md --- README.md | 24 ++++++++--- src/css/popup.css | 5 ++- src/html/links.html | 16 ++++--- src/html/popup.html | 25 ++++++++--- src/js/inject.js | 3 +- src/js/links.js | 56 ++++++++++++++++-------- src/js/main.js | 24 ++++++++--- src/js/options.js | 12 +++--- src/js/popup.js | 101 ++++++++++++++++++++++++++++++++++++++++++-- src/manifest.json | 1 + 10 files changed, 212 insertions(+), 55 deletions(-) diff --git a/README.md b/README.md index db11634..fbb727d 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,14 @@ [![Build](https://github.com/cssnr/link-extractor/actions/workflows/build.yaml/badge.svg)](https://github.com/cssnr/link-extractor/actions/workflows/build.yaml) +[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=cssnr_link-extractor&metric=alert_status)](https://sonarcloud.io/summary/overall?id=cssnr_link-extractor) [![GitHub Release](https://img.shields.io/github/v/release/cssnr/link-extractor)](https://github.com/cssnr/link-extractor/releases/latest) [![Chrome Web Store Version](https://img.shields.io/chrome-web-store/v/ifefifghpkllfibejafbakmflidjcjfp?label=chrome&logo=googlechrome)](https://chrome.google.com/webstore/detail/link-extractor/ifefifghpkllfibejafbakmflidjcjfp) [![Mozilla Add-on Version](https://img.shields.io/amo/v/link-extractor?label=firefox&logo=firefox)](https://addons.mozilla.org/addon/link-extractor) -[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=cssnr_link-extractor&metric=alert_status)](https://sonarcloud.io/summary/overall?id=cssnr_link-extractor) [![Chrome Web Store Users](https://img.shields.io/chrome-web-store/users/ifefifghpkllfibejafbakmflidjcjfp?logo=google&logoColor=white&label=google%20users)](https://chrome.google.com/webstore/detail/link-extractor/ifefifghpkllfibejafbakmflidjcjfp) [![Mozilla Add-on Users](https://img.shields.io/amo/users/link-extractor?logo=mozilla&label=mozilla%20users)](https://addons.mozilla.org/addon/link-extractor) # Link Extractor -Modern Chrome and Firefox Addon to easily extract all links/domains from a web page with optional filters. -Including automatic dark/light mode, copy all links or domains, striped tables, and more... +Modern Chrome and Firefox Addon to easily extract, parse, and open all links/domains from a web page with optional filters. +Feature packed with automatic dark/light mode, copy to clipboard, keyboard shortcuts, custom options, and much more... * [Install](#install) * [Features](#features) @@ -28,12 +28,14 @@ Please submit a [Feature Request](https://github.com/cssnr/link-extractor/discus for any new features you would like to see implemented. * Extract all Links and/or Domains +* Parse or open links from text or clipboard * Copy all URLs or Domains to the clipboard * Quick Filter URLs with a regular expression * Quick Filter links by a saved regular expressions * Automatic Dark/Light mode based on browser setting +* Keyboard Shortcuts for Copying Links or Domains -[![Screenshot of Links and Popup](https://repository-images.githubusercontent.com/707614074/fd2e2fe9-d896-42eb-80be-603f5230d36e)](https://github.com/cssnr/link-extractor) +[![Screenshot of Links and Popup](https://repository-images.githubusercontent.com/707614074/7807bbb5-ec14-4fae-85d8-e3252a460cff)](https://github.com/cssnr/link-extractor) # Configuration @@ -50,6 +52,9 @@ Make sure to click`Save Options` when finished. For more information on regex, s To build locally or run from source, clone the repository then run `npm install`. You can then run the addon from the [src](src) directory as normal. +NPM is only used to manage dependency versions and copy files to `src/dist`. +Files are copied automatically after `npm install`. See [gulpfile.js](gulpfile.js) for more information. + The extension is automatically built on new releases then automatically uploaded to that release. See [build.yaml](.github/workflows/build.yaml) for more information. @@ -63,12 +68,17 @@ See [build.yaml](.github/workflows/build.yaml) for more information. ## Firefox +For development, you can and should load unpacked in Firefox as a temporary addon. +This will **not** remain after restarting Firefox. It is also useful to keep data after removing an extension. + +1. Download a [Release](https://github.com/cssnr/link-extractor/releases). +1. Load temporary from: `about:debugging#/runtime/this-firefox` +1. Open `about:config` search for `extensions.webextensions.keepStorageOnUninstall` and set to `true`. + > **Note** > -> This **does not** work on Release Firefox! +> This method **does not** work on Release Firefox and is NOT recommended for development. > You must use [ESR](https://www.mozilla.org/en-CA/firefox/all/#product-desktop-esr), Development, or Nightly. -1. Download a [Release](https://github.com/cssnr/link-extractor/releases). 1. Open `about:config` search for `xpinstall.signatures.required` and set to `false`. 1. Open `about:addons` and drag the zip file to the page or choose Install from File from the Settings wheel. -1. You may also load temporary from: `about:debugging#/runtime/this-firefox` diff --git a/src/css/popup.css b/src/css/popup.css index d95a843..da1f8e1 100644 --- a/src/css/popup.css +++ b/src/css/popup.css @@ -1,7 +1,8 @@ body { - width: 280px; + width: 300px; } -input::placeholder { +input::placeholder, +textarea::placeholder { text-align: center; } diff --git a/src/html/links.html b/src/html/links.html index 10a78c8..a4bdc43 100644 --- a/src/html/links.html +++ b/src/html/links.html @@ -14,9 +14,11 @@

Loading...