Generate Links for Headers

#4.91 / 11 rate

Generate Links for Headers

460 users

2020-02-16

Grant Winney

browser-extensions@gra...

Extension Information

5 star
83%
4 star
17%
3 star
0%
2 star
0%
1 star
0%

Supported Languages

Description

Automatically generates links for all headers on the page, to make it easier to share specific sections of the page.

Ever wanted to share a link, not just to a webpage, but to a particular section of a webpage?

Most of the time, when you see a header on a webpage, it has an ID associated with it. You can use the ID to create a link to that section, but finding the ID usually means viewing the source code for the page, finding the header element for the section you want, and appending the ID to the URL before sharing it.

It doesn't have to be that hard.

CREATING LINKS AUTOMATICALLY

This extension scans the page and generates links for all headers on the page, assuming they have an ID or Name assigned.

- Hover over any header, and an anchor link will appear.

- Click on the "chain" icon to copy the link to your clipboard.

If there's no ID or Name in the header tag, it will search any elements nested inside the header tag for the first one with an ID or Name assigned. Failing that, it looks at the immediate parent element (i.e. a header nested in a DIV). If it still finds nothing, then no link will be generated or shown.

REQUIRED PERMISSIONS

It'll ask you for permission to read and modify all pages, because that's what it does. It scans the page for headers with IDs (or Names), and then injects one link for each header that has it present.

NEED HELP?

If you need help, have a comment or suggestion, or just want to see the code for yourself, visit the GitHub repo where the source code is hosted. You can open an issue by clicking the "Issues" tab at the top.

https://github.com/grantwinney/generate-links-for-headers-in-chrome

WANT TO LEARN MORE?

If you'd like to write your own Chrome extension, but aren't sure where to start, check out this brief tutorial:

https://grantwinney.com/making-your-first-chrome-extension

Reviews

Thanee Charattrakool
Thanee Charattrakool

It's pretty work and easy to use !!!

Jerry R Cole - LightBox
Jerry R Cole - LightBox

Truly plug and play! Works great. I like that the link icon only appears after you hover your mouse over the heading. As other reviewers have noted, the extension only generates anchor links if the author of the page properly added an html ID to the heading element.

Pavol Závodský Kutaj
Pavol Závodský Kutaj

Works as expected out-of-the-box in an elegant, non-intrusive, single-click manner: you built the right thing, which is the hardest part of software as per https://www.simplethread.com/20-things-ive-learned-in-my-20-years-as-a-software-engineer/ :)

Similar extensions

Anchor headings
Anchor headings

Michael Radionov

Link to Element
Link to Element

Alex Dergachev

Rich URL
Rich URL

Pavlo Ukhan

TabPolish
TabPolish

Zach

Hyperlink from selected text
Hyperlink from selected text

TGSchmidt

Bookmark Manager per Domain and Page
Bookmark Manager per Domain and Page

https://mikulabeutl.com

Link With Context
Link With Context

mrjaeger00

Table of Contents Sidebar
Table of Contents Sidebar

codedraken

Copy Link With Title
Copy Link With Title

Paul Cohn

Turbo Outliner
Turbo Outliner

ShuoWu

Link to Here
Link to Here

Jeffrey Yasskin

Display #Anchors
Display #Anchors

Rob W