Closed kernc closed 3 years ago
Issue: Each time one clicks on a reference to an entity in a current document, the document is reloaded. This is a result of the references normally pointing to http: protocol whereas the documents are sometimes served over https: protocol.
http:
https:
Reproducible example:
rdfs:
Instead, one ought to just jump to the appropriate section by a change of hash fragment, without re-retrieving the document.
I recommend to clean the entity's URL here: https://github.com/kianschmalenbach/rdf-browser/blob/5e3749a5a23dcc7bc739df2817b34d5556360259/src/bdo/resource.js#L78-L79 Something like:
function relativize_url(url) { let url = new URL(url); if (url.host == window.location.host && url.pathname == window.location.pathname) return url.hash; return url.href; } ... link.setAttribute("href", encodeURI(relativize_url(this.value)));
Excellent addon! Cheers,
Hi, Thanks for your feedback! This issue should be fixed with current version 1.2.0.
Cheers, Kian
Issue: Each time one clicks on a reference to an entity in a current document, the document is reloaded. This is a result of the references normally pointing to
http:
protocol whereas the documents are sometimes served overhttps:
protocol.Reproducible example:
rdfs:
link.Instead, one ought to just jump to the appropriate section by a change of hash fragment, without re-retrieving the document.
I recommend to clean the entity's URL here: https://github.com/kianschmalenbach/rdf-browser/blob/5e3749a5a23dcc7bc739df2817b34d5556360259/src/bdo/resource.js#L78-L79 Something like:
Excellent addon! Cheers,