annotator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gerben <ger...@treora.com>
Subject Precise-links browser extension
Date Mon, 29 May 2017 19:20:28 GMT
Hi all,

I have been silent here so far, but have been working a bit with Randall
& Benjamin on our shared webby ambitions, and thought I'll share this
one for your interests. At the I Annotate <https://iannotate.org>
conference last month I made a simple browser extension to support Web
Annotation Selectors in fragment identifiers, as specified in this W3C
note <https://www.w3.org/TR/2017/NOTE-selectors-states-20170223/#frags>.
A location such
ashttps://en.wikipedia.org/w/index.php?title=Koala&oldid=781295795#selector(type=TextQuoteSelector,exact=fluffy%20ears)
<https://en.wikipedia.org/w/index.php?title=Koala&oldid=781295795#selector%28type=TextQuoteSelector,exact=fluffy%20ears%29>
will scroll to the words /fluffy ears/ and select them.

*Technicalities:*

The extension currently only supports TextQuoteSelectors using
dom-anchor-text-quote
<https://github.com/tilgovi/dom-anchor-text-quote>, which I abstracted
through a minimal library I dub dom-anchor-selector
<https://github.com/Treora/dom-anchor-selector>, with the intention of
adding support for other selector types. I would be glad to have this
library moved or rewritten under the Apache Annotator umbrella if there
is interest.

The conversion between the selector as a javascript object and as a
fragment identifier is done by code borrowed from Ivan Herman's
converter
<http://w3c.github.io/web-annotation/selector-note/converter/>, packaged
as a module first by me here
<https://github.com/Treora/selector-state-frags>, and again by Randall
here
<https://github.com/apache/incubator-annotator/tree/master/packages/fragment-identifier>
under the Apache Annotator project.

*Try it:*

For Firefox, available here
<https://addons.mozilla.org/en-US/firefox/addon/precise-links/>.

For Chromium, I yet only published it on my own server, here
<https://temp.treora.com/precise-links.crx> for now. To install,
download it and drag&drop the file to your list of extensions
(chrome://extensions).

To create link to a segment of text, right-click the selection and
choose 'Copy link to selected text'.

*Improve it:*

Extension code is here <https://github.com/Treora/precise-links>, though
most improvements are to be done in the dependencies mentioned above.

It may be nice to also create a version of this code that people can
easily include in their web pages, something I did previously with
quoteurl <https://github.com/Treora/quoteurl>.

Cheers,

Gerben


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message