[annotator-dev] Annotator Offline Plugin - How to annotate more than one page

Aron Carroll aron at hypothes.is
Thu Jan 8 14:03:22 UTC 2015


Hi Alex,

You’ll need to provide a custom `shouldLoadAnnotation` function[1] that takes the url into account.

Something like:

    jQuery(‘#content’).annotator().annotator(‘addPlugin’, ‘offline’, {
      shouldLoadAnnotation: function (ann) {
        return ann.url === window.location.href;
      }
    });

Hope that helps.
Aron

[1]:https://github.com/aron/annotator.offline.js#options

> On 8 Jan 2015, at 10:24, Alexander Wülfing <alexander.wuelfing at gmail.com> wrote:
> 
> Hi,
> 
> is anyone using the offline plugin?
> https://github.com/aron/annotator.offline.js
> 
> How can I use it on multiple sites? If I include comments in more then one website I see the annotations from website A in website B as well.
> 
> Regards and thanks
> 
> Alex
> _______________________________________________
> annotator-dev mailing list
> annotator-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/annotator-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/annotator-dev




More information about the annotator-dev mailing list