Open machawk1 opened 5 years ago
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.
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.
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