Mink icon indicating copy to clipboard operation
Mink copied to clipboard

Cached TimeMaps are listed for mementos visited on options page

Open machawk1 opened this issue 6 years ago • 3 comments

machawk1 avatar Apr 06 '19 18:04 machawk1

This is due to mentos themselves having "TimeMaps" in the Link header. Mink associates the information in this header with the URI-M. This caching might subsequently involve navigation, so we cannot simply exclude it from being added to localStorage, as it might be tied into other parts of the current implementation.

We could flag it in the UI to not be displayed but still use the information under-the-hood. Future work might be to disassociate the TMs retained from URI-Ms with the representation at actual URI-Ts.

https://github.com/machawk1/Mink/blob/ff8d0ef5b530fd12fdaf9fd8f06e94122ecbf819/mink-plugin/content.js#L168-L178

machawk1 avatar Aug 19 '19 19:08 machawk1

Commenting out:

          //chrome.runtime.sendMessage({
          //  method: 'setTimemapInStorageAndCall', tm: tm, url: document.URL
          //})

or not executing this conditional will prevent the entry from being inserted into localStorage and thus it won't appear in the dropdown on the options page. This is the wrong approach to take.

machawk1 avatar Aug 19 '19 20:08 machawk1

Additional caveat: selecting the URI-M entry in the options dropdown for cached TMs produces an exception, as however we are storing it in localStorage is malformed compared to how TMs for URI-Rs are stored.

machawk1 avatar Aug 19 '19 20:08 machawk1