Live data from Hacker News

Show HN: Pinpointer – A Firefox extension to share links to page elements

addons.mozilla.org

11–20 of 28 posts

Re: Show HN: Pinpointer – A Firefox extension to share links to page elements

#11
post #5

I have installed it and it doesn't work. In the Mozilla addons page it just says " Pinpointer error ". In this HN page, it prompts me to select and click a green button, but fails to do anything. It's an interesting concept, keep going! edit: Firefox 62.0b9 (32-bit) in up-to-date Ubuntu 16.04, with uMatrix and other extensions running.

Content scripts are disabled on addons.mozilla.org

Re: Show HN: Pinpointer – A Firefox extension to share links to page elements

#12

"It requires your permission to: Access your data for all web sites" I wish Firefox had a permission along the lines of 'Access all data from pages on which I activate the extension', which is presumably all this would need.

It also needs data when you click on a link it created in the past, which there's no real way for it to know in advance. (It could possibly use a custom protocol but it would break backwards compatibility with HTTP which would be a big downside)

Re: Show HN: Pinpointer – A Firefox extension to share links to page elements

#13
post #6
post #3

Earlier quoted context omitted.

You should post such a generated link here as an example, so people can immediately try it by clicking on it.

Good point. https://en.wikipedia.org/wiki/Nelson_Mandela#aHRtbCA%2BIGJvZ... (I wasn't kidding about needing to shorten those links.)

[deleted]

Re: Show HN: Pinpointer – A Firefox extension to share links to page elements

#14
post #6
post #3

Earlier quoted context omitted.

You should post such a generated link here as an example, so people can immediately try it by clicking on it.

Good point. https://en.wikipedia.org/wiki/Nelson_Mandela#aHRtbCA%2BIGJvZ... (I wasn't kidding about needing to shorten those links.)

It kind of defeats the point that you need the extension to view the generated links.

You may want to add an option to select only from the anchors/ids from the page to generate links which work in any browser.

Though there may already be an extension for this.

Re: Show HN: Pinpointer – A Firefox extension to share links to page elements

#15

"It requires your permission to: Access your data for all web sites" I wish Firefox had a permission along the lines of 'Access all data from pages on which I activate the extension', which is presumably all this would need.

As yoklov said, I had to have a small script[1] run a quick check on every page you visit to check if the URL is a Pinpointer URL. As far as I can tell there's no way around this (and I'd say breaking backwards compatibility with HTTP is a bit drastic for a little browser extension like this).

[1] https://github.com/Rumperuu/Pinpointer/blob/master/content_s...

Re: Show HN: Pinpointer – A Firefox extension to share links to page elements

#16
post #14
post #6

Earlier quoted context omitted.

Good point. https://en.wikipedia.org/wiki/Nelson_Mandela#aHRtbCA%2BIGJvZ... (I wasn't kidding about needing to shorten those links.)

It kind of defeats the point that you need the extension to view the generated links. You may want to add an option to select only from the anchors/ids from the page to generate links which work in any browser. Though there may already be an extension for this.

If you mean what I think you mean, you can already send a link that specifies a valid element ID on the page to anybody and have their browser focus on it — that's what fragment identifiers are for. However, if the page designer has neglected to provide a unique ID for each page element (and they probably have), you're out of luck. Ideally, you'd be able to specify any valid CSS selector that only selects one element as a fragment identifier, but that's not the case (and is basically what this extension makes possible).

Re: Show HN: Pinpointer – A Firefox extension to share links to page elements

#17

"It requires your permission to: Access your data for all web sites" I wish Firefox had a permission along the lines of 'Access all data from pages on which I activate the extension', which is presumably all this would need.

As yoklov said, I had to have a small script[1] run a quick check on every page you visit to check if the URL is a Pinpointer URL. As far as I can tell there's no way around this (and I'd say breaking backwards compatibility with HTTP is a bit drastic for a little browser extension like this). [1] https://github.com/Rumperuu/Pinpointer/blob/master/content_s...

Could you not use webNavigation[0] to check the url and permissions API to ask for permission[1] if necessary?

EDIT: Or tabs.onUpdated if webNavigation doesn't fire for hash changes[2]

[0] https://developer.mozilla.org/en-US/Add-ons/WebExtensions/AP...

[1] https://developer.mozilla.org/en-US/Add-ons/WebExtensions/AP...

[2] https://developer.mozilla.org/en-US/Add-ons/WebExtensions/AP...

Re: Show HN: Pinpointer – A Firefox extension to share links to page elements

#18
post #2

I wanted to try making a browser extension and it seemed weird to me that there didn't seem to exist any means of linking to specific elements on a web page if they hadn't been given IDs to make a fragment identifier out of, so I made this. You select a page element and generate a link, which you can then share. For someone without the extension, the link will work as normal and just take them to the page, but someon…

You should also give more explanation on the addons pages, I read it and didn't understand what it does until I read this comment.

Re: Show HN: Pinpointer – A Firefox extension to share links to page elements

#19
post #6
post #3

Earlier quoted context omitted.

You should post such a generated link here as an example, so people can immediately try it by clicking on it.

Good point. https://en.wikipedia.org/wiki/Nelson_Mandela#aHRtbCA%2BIGJvZ... (I wasn't kidding about needing to shorten those links.)

Cypress (the testing framework) has a way to get a short, unique selector for any element on a page. It's even in its own npm package: https://www.npmjs.com/package/@cypress/unique-selector
Post reply on HN