annotator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gerben <>
Subject Re: Precise-links browser extension
Date Tue, 11 Jul 2017 00:29:12 GMT
Sure, on the wiki could work. Just to get the ball rolling, I drafted a
possible outline with some questions:

On 2017-07-09 02:22, Benjamin Young wrote:
> Agreed. Let's begin working on some API design while Randall finishes sorting out the
build kit and importing his libraries.
> We can do that on the wiki, if that works:
> Cool? :)
> -----Original Message-----
> From: Gerben [] 
> Sent: Saturday, July 8, 2017 7:47 PM
> To:
> Subject: Re: Precise-links browser extension
> On 2017-07-03 18:14, Benjamin Young wrote:
>> This is fabulous work, Gerben! Apologies for only just now following up.
>> I'm curious--from both you and Randall--what it would take to make Apache Annotator
be the source of the libraries this Web extension depends on.
> I think it would take a rough consensus on how packages should be organised (with what
scope and APIs etc.), and then a bit of coding to implement them. I'm happy to code some things,
but don't want to waste time making stuff that others would consider e.g. out of scope. Perhaps
we could start drafting API docs together to align our plans.
>> I know we still need to bring Randall's dom-anchor things "into the fold." However,
I'm also curious what's different between your packaged version of the fragment identifier
library and the one Randall did here. I'm guessing at least the ES6-ification?
> They are nearly the same, but Randall did some more refactoring of the original code
> by Ivan Herman. I think we should agree on the desired API and merge them into one.
>> The next steps--we seem to be having a hard time taking--is getting these libraries
wrapped or added to the Apache Annotator repo + a similar factory style wrapper like the one
you and Sasha have both created.
>> Help narrowing in on the differences will be useful.
>> Also, pull requests more than welcome! :)
>> Cheers!
>> Benjamin
>> -----Original Message-----
>> From: Gerben []
>> Sent: Monday, May 29, 2017 3:20 PM
>> To:
>> Subject: Precise-links browser extension
>> 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 <> conference last month I made a simple browser extension
to support Web Annotation Selectors in fragment identifiers, as specified in this W3C note
>> A location such
>> as
>> ector(type=TextQuoteSelector,exact=fluffy%20ears)
>> <
>> ctor%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
<>, which I abstracted through a minimal
library I dub 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 
>> <>, 
>> packaged as a module first by me here 
>> <>, and again by Randall 
>> here 
>> <
>> agment-identifier>
>> under the Apache Annotator project.
>> *Try it:*
>> For Firefox, available here
>> <>.
>> For Chromium, I yet only published it on my own server, here <>
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 <>, 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 <>.
>> Cheers,
>> Gerben

View raw message