Giter VIP home page Giter VIP logo

ukwa-browser-toolkit's Introduction

Tachyon - Browse The Past

Chrome version Firefox version Autodeployment

Chrome and Firefox web extension

Install

Description

This is an experimental web extension exploring whether we can make proxy-mode access to web archives easy from within the users' own browser (rather than relying on a standalone application).

Ideally, we could have different target time settings in every tab. However, browser proxy settings are not tab-scoped, they are global, so this is not trivial to implement. Even if we switch proxy settings when tabs are stwiched, any background activity in a tab will be re-directed to a different datetime when the switch is made. It may be possible to come up with more elaborate solutions for this, but for now it seems easier to accept that the proxy is a global setting and work with that.

In this approach, each tab would indicate whether it the target time (Memento datetime or current/live web) had been changed since the page was loaded. i.e. this potential for inconsistency would be made clear to the user, rather than being wholly avoided.

The address bar button would be used to communicate the page status, whereas the toolbar button would be used to control the browser-level settings.

The address bar button should be coloured according to how good the fit between the target time and the page time(s) is. The button should provide a popup that at least gives the datetime of the main frame (but could be extended to show e.g. time-range of resources in page).

The main temporal navigation would be through the toolbar button. This would be used to set the target time and engage/disengage the archival proxy (or proxies). It would also summarise the current page mementos available to assist in temporal navigation (e.g. jump to first previous next last would be shown here). Actions here can also force a reload of the page and possible clear the cache (as needed). The proxy-blocker example extension is a useful guide for the basics of managing proxy settings.

Under the hood, the extension will need to put in the Accept-Datetime header on requests and likely try to avoid caching content by modifying headers in the response.

We can also register a protocol handler to support URIs that point to an archived web page. Due to security limitations we can't add any-old protocols (e.g. no webarchive: or pwid: as proposed here), but we can add a web+archive: protocol and let the extension handle those links (here's how that was done for ssh). Our extension could look for URIs something like:

web+archive://proxy.webarchive.org.uk:80/?url=http://portico.bl.uk&timestamp=20010101120000
web+archive://proxy.webarchive.org.uk:80/?url=http://www.bl.uk&datetime=2016-01-22T11.20.29Z&api=proxy
web+pwid:archive.org:2016-10-20_22.26.35_page:https://www.doi.org/

On receiving those URIs, the extension would set the proxy and Accept-datetime appropriately, engage time-travel mode and load the required URI. Sadly, as this all needs proxy-modification to work at all, we can't leave them in the address bar, but we can perhaps support them as 'canonical' URIs and expose them well enough that they can be bookmarked by the user.

As well as this, it may make sense to support a custom content type for e.g. lists of archival bookmarks. The pdf.js extension shows how do to that kind of thing.

Other ideas:

  • Intercept 404s and offer replacements (e.g. highlight toolbar button)
  • Offer indication of archival status of all pages. e.g.
    • Badge colour indicates duration since last archival crawl. Red for none.
    • Badge number indicates number of known archival snapshots.
    • Offer to submit to archives.
  • Allow user to easily switch between proxy services.
  • Extend support/definition of 'archival bookmarks' (e.g. integrate them as proper bookmarks?)
  • Support the PWID notion of Context of use and help the user understand the scope if a bookmark.
  • Allow different proxies to be specified for different host/SURT ranges?
  • Interface with UKWA W3ACT API and allow some curation activities from in the browser?

Some examples for testing (GitHub Markdown seems not to recognised them as links however):

  • portico.bl.uk c. 1995
  • portico.bl.uk c. 2001
  • portico.bl.uk c. 2008
  • portico.bl.uk c. 2012
  • webarchive.org.uk c. 2008
  • webarchive.org.uk c. 2012

Dev

npm install && npm run dev

Build

npm run build

extensions are in ./build folder

./build/tachyon.chrome.zip
./build/tachyon.firefox.xpi

License

This project is licensed under the terms of the GNU AGPLv3.

Issues

Report issues on Tachyon project

Change Log

2017-10-22

At this point, we switch tactics and try to support proxy-mode access and resolvable 'archival bookmark' URIs.

Also added a more comprehensive build system based on that used by this lesspass web extension.

Pre-2017 this extension aimed to re-direct requests to archived Mementos by intercepting webRequests and redirecting them to Memento API enpoints. This proved too difficult to get to work without relying on re-writing the page content (in particular, JavaScript HTTP requests were being blocks due to appearing to be cross-site requests, but this was being done within the jQuery library, before the request could get to the extension and be re-mapped).

As the original intention was to aim for the highest possible playback quality, the strategy was switch to exploring how to make proxy-mode playback more usable. Furthermore, in the intervening time, many browsers have moved towards a common standard for web extensions, meaning that it should be possible to make the extension available to many different browsers (not just Chrome).

ukwa-browser-toolkit's People

Contributors

anjackson avatar

Watchers

 avatar James Cloos avatar Kenji Nagahashi avatar  avatar Joe O'Brien avatar  avatar Nicola Bingham avatar Mindaugas Vidmantas avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.