ArchiveLabs / pragma.archivelab.org

An API for citing Wayback snapshots with OpenAnnotations
https://pragma.archivelab.org
GNU General Public License v3.0
22 stars 3 forks source link

Extend PRAGMA playback to support javascript selections #5

Open mekarpeles opened 6 years ago

mekarpeles commented 6 years ago

Currently the https://pragma.archivelab.org/playback/:id interface only works if an annotation is saved having a value of {"id": "xxx"} where xxx is some css ID which can be found within the Save Page Now'd webpage. It would be nice if an annotation could save a javascript selection and the /playback javascript was capable of (after loading the desired pragma wayback ID to playback) surrounding the selection with a span which could then be styled. i.e. extend citations to arbitrary selections (or at least also support css classes) instead of just css IDs.

Some of this work has been started here: https://gist.github.com/mekarpeles/a1a60865d2d50e8c0b08bf1b39e8b718