Git Product home page Git Product logo

cssnr / link-extractor Goto Github PK

View Code? Open in Web Editor NEW
28.0 2.0 3.0 515 KB

Web Extension to extract, parse, and open links with optional filters.

Home Page: https://link-extractor.cssnr.com

License: GNU General Public License v3.0

JavaScript 71.34% CSS 0.89% HTML 27.77%
chrome-extension firefox-extension web-extension link-extractor link-extraction browser-extension chrome-addon firefox-addon extract-links

link-extractor's Introduction

Chrome Web Store Users Mozilla Add-on Users Chrome Web Store Rating Mozilla Add-on Rating GitHub Repo stars Chrome Web Store Version Mozilla Add-on Version GitHub Release Version Build Test Quality Gate Status GitHub Last Commit GitHub Top Language Discord

Link Extractor

Modern Chrome Web Extension and Firefox Browser Addon to easily extract, parse, or open all links/domains from a site or text with optional filters. Feature packed with automatic dark/light mode, copy to clipboard, keyboard shortcuts, custom options, and much more...

Website: https://link-extractor.cssnr.com/

Install

Chrome Firefox Edge Brave Opera Chromium Yandex

All Chromium Based Browsers can install the extension from the Chrome Web Store.

Mobile browser support available for Firefox and Yandex.

Features

Please submit a Feature Request for new features.
For any issues, bugs or concerns; please Open an Issue.

  • Extract All Links and Domains from Any Site
  • Extract Links from Selected Text on any Site
  • Extract Links from Clipboard or Any Text
  • Extract Links from All Selected Tabs
  • Display Additional Link Details and Text
  • Open Multiple Links in Tabs from Text
  • Download Links and Domains as a Text File
  • Copy the Text from a Link via Context Menu
  • Quick Filter Links with a Regular Expression
  • Store Regular Expressions for Quick Filtering
  • Import and Export Saved Regular Expressions
  • Automatic Dark/Light Mode based on Browser Setting
  • Activate from Popup, Context Menu, Keyboard Shortcuts or Omnibox

Link Extractor Screenshots

Planned Upcoming Features

  • Option to Set Names/Titles for Saved Filters
  • Option to Extract Using Multiple Filters with AND/OR

Tip

Don't see your feature here? Request one on the Feature Request Discussion.

Configuration

You can pin the Addon by clicking the Puzzle Piece, find the Link Extractor icon, then;
Chrome, click the Pin icon.
Firefox, click the Settings Wheel and Pin to Toolbar.

To open the options, click on the icon (from above) then click Open Options.
You can also access Options through the right-click context menu (enabled by default).
Here you can set flags and add as many saved regular expressions as you would like for easy use later.
Make sure to clickSave Options when finished.

For more information on regex, see: https://regex101.com/

Support

For help using the web extension or to request features, see:

If you are experiencing an issue/bug or getting unexpected results, you can:

Logs can be found inspecting the page (Ctrl+Shift+I), clicking on the Console, and; Firefox: toggling Debug logs, Chrome: toggling Verbose from levels dropdown.

To support this project, see the Contributing section at the bottom.

Development

Quick Start

First, clone (or download) this repository and change into the directory.

Second, install the dependencies:

npm install

Finally, to run Chrome or Firefox with web-ext, run one of the following:

npm run chrome
npm run firefox

Additionally, to Load Unpacked/Temporary Add-on make a manifest.json and run from the src folder, run one of the following:

npm run manifest:chrome
npm run manifest:firefox

Chrome: https://developer.chrome.com/docs/extensions/get-started/tutorial/hello-world#load-unpacked
Firefox: https://extensionworkshop.com/documentation/develop/temporary-installation-in-firefox/

For more information on web-ext, read this documentation.
To pass additional arguments to an npm run command, use --.
Example: npm run chrome -- --chromium-binary=...

Building

Install the requirements and copy libraries into the src/dist directory by running npm install. See gulpfile.js for more information on postinstall.

npm install

To create a .zip archive of the src directory for the desired browser run one of the following:

npm run build
npm run build:chrome
npm run build:firefox

For more information on building, see the scripts section in the package.json file.

Chrome Setup

  1. Build or Download a Release.
  2. Unzip the archive, place the folder where it must remain and note its location for later.
  3. Open Chrome, click the 3 dots in the top right, click Extensions, click Manage Extensions.
  4. In the top right, click Developer Mode then on the top left click Load unpacked.
  5. Navigate to the folder you extracted in step #3 then click Select Folder.

Firefox Setup

  1. Build or Download a Release.
  2. Unzip the archive, place the folder where it must remain and note its location for later.
  3. Go to about:debugging#/runtime/this-firefox and click Load Temporary Add-on...
  4. Navigate to the folder you extracted earlier, select manifest.json then click Select File.
  5. Optional: open about:config search for extensions.webextensions.keepStorageOnUninstall and set to true.

If you need to test a restart, you must pack the addon. This only works in ESR, Development, or Nightly. You may also use an Unbranded Build: https://wiki.mozilla.org/Add-ons/Extension_Signing#Unbranded_Builds

  1. Run npm run build:firefox then use web-ext-artifacts/{name}-firefox-{version}.zip.
  2. Open about:config search for xpinstall.signatures.required and set to false.
  3. Open about:addons and drag the zip file to the page or choose Install from File from the Settings wheel.

Contributing

Currently, the best way to contribute to this project is to give a 5-star rating on Google or Mozilla and to star this project on GitHub.

Other Web Extensions I have created and published:

For a full list of current projects visit: https://cssnr.github.io/

link-extractor's People

Contributors

smashedr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

link-extractor's Issues

[function request] a new option to be added

Hey,

I was just looking for an extension that help me to find all the links filtered by domain name, but... using also AND operator.
Your extension is missing it as I see, would be nice to add it, what You think ?

I mean, If I add for instance:

  • domain1.com
  • domain2.com
  • ...

In the page context menu there is only one filter option to choose - I cant choose for instance 3 of them at once.

Also in the extension menu I can only filter by giving a regex pattern, so I need to prepare a long list of domains and write a long row for regexp.

You have a good option to add domains to filter, but there is no option to merge all or some of them, to search for all or chosen ones.

CheerrZ!

Open options page instead of extracted links page

As per title, whenever using any filter or even trying to extract all domains. Happens from context menu, keyboard shortcut and from icon. It was working two weeks ago. Firefox 127, tried latest version (0.7) and 0.6.1

Find Links in shadowRoot's

Links are not being extracted from shadowRoots. Will need to add a recursive function to extract from nested roots:

function getAllLinks(root) {
    let links = []
    if (root.querySelectorAll) {
        links = Array.from(root.querySelectorAll('a'))
    }
    const shadowRoots = Array.from(root.querySelectorAll('*')).filter(
        (el) => el.shadowRoot
    )
    shadowRoots.forEach((el) => {
        links = links.concat(getAllLinks(el.shadowRoot))
    })
    return links
}

const allLinks = getAllLinks(document)
console.log(allLinks)

Example Site: https://archive.org/

I will try to add a fix for this in the next version.
Thank you to feedback reports for surfacing this issue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.