Last active
November 7, 2017 13:19
-
-
Save Conal-Tuohy/5f48ede761bdf1de4a871af77e4ff341 to your computer and use it in GitHub Desktop.
Userscript for the National Library of Australia's Trove portal; sets the browser's location URL to be the canonical URL of the work
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Canonicalise Trove work URI | |
// @namespace http://conaltuohy.com/ | |
// @version 0.1 | |
// @description Sets the browser location URL to the canonical URL of the work | |
// @author Conal Tuohy (@conal_tuohy) | |
// @match http://trove.nla.gov.au/work/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
window.history.pushState({}, '', document.querySelector('dl.details dd a').getAttribute('href')); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ensure you have TamperMonkey installed, then click to install Canonicalise Trove Work URI; TamperMonkey should then prompt you to install the userscript.