Giter Club home page Giter Club logo

href-taker's Introduction

HrefTaker

The userscript that adds a popup to collect URLs from a web page. It's mainly aimed for static web sites.

It grabs the links from anchors' hrefs (a HTML tag) as well as from non-hyperlink visible text.

Screenshot

Popup is draggable and resizable. Use the upper edge to move the popup. To resize the popup use the right bottom corner.

Changing of controls/filters immediately effects on the result list.

Popup can be not only closed, but minimized.

It keeps the state in LocalStorage.


To install open this URL: https://github.com/AlttiRi/href-taker/raw/master/dist/href-taker.user.js

An installed userscript manager extension (VM/TM) is required.


To open the popup use the userscript manager's menu command:

image


The userscript has by default:

// @match       *://*/*

It's recommended to overwrite the rule in the userscript manager's settings to run the script only in the locations where you need it:

image


To use the userscript in file:// pages you need to enable "Allow access to file URLs" checkbox in the userscript manager extension's setting:

image


Demo

Here is a demo webpage to try this popup.


Filters

To filter the result list use "Only" and "Ignore" inputs.

The result list will have any URL which includes any word from Only input and no one from Ignore input.

Use the right mouse button (RMB) click on the input prompt ("Only"/"Ignore" text) to disable the input rule.

Additionally, with the middle mouse button (MMB) click on the "Only" prompt text you can reverse the filter rule.

Controls

Buttons

  • "List links" button collects and lists the URLs. RMB click clears the list.
  • "Copy" button copies the links separated by a space. With RMB click the links will be separated by a new line (\n) character.
  • "URLs to text" button converts links' text to the original URL value. The second click reverts the changes.
  • "Extra Settings" button toggles showing the additional options.

Checkboxes

  • "Include text" checkbox — to additionally parse URLs from text (innerText), not only from a tag elements.
  • "Only text" checkbox — to parse URLs only from the web page visible text content, not from a tags.

Extra checkboxes

  • "Auto open" — to automatically show the popup/minimized popup on a web page is loaded event even the popup was closed last time.
  • "Auto list" — to automatically collect and list URL on popup is opened.
  • "Only unique" — to list only unique URLs without duplicates.
  • "Sort" — to sort URLs by hostname.
  • "Reverse" — to revers order the result URLs list.
  • "Case-sensitive" — for case-sensitive matching.
  • "No 1st-party" — to exclude 1st-party links, and list only 3rd-party ones.
  • "https" — to replace http:// with https://.
  • "Trim brackets" — to enable extra logic for text URL parsing for links are included (,),[,] characters.
  • "Console log" — to log some data to the console while working.
  • "Console vars" — to expose some variables into the console. For example, urls variable.

Also in the extra settings you can enable the tags feature. It allows to filter URLs more convenient by hostname tags.

image

Selector

  • It defines from which element(s) to parse URLs. By default, it's body selector.

See also

href-taker's People

Contributors

alttiri avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.