Created
February 22, 2012 13:39
-
-
Save choffee/1885201 to your computer and use it in GitHub Desktop.
Footprints replace quickEdit with the more useful Details
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 Footprints details | |
// @namespace http://userscripts.org/users/58394 | |
// @description Changes the details from | |
// @include https://footprints.york.ac.uk/* | |
// ==/UserScript== | |
// | |
// | |
window.addEventListener("load", function(e) { | |
var links; | |
links = document.evaluate( ".//a[starts-with(@href,'javascript: quickEdit')]", | |
document, | |
null, | |
XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, | |
null); | |
for (var i=0; i < links.snapshotLength; i++) { | |
var thisLink = links.snapshotItem(i); | |
thisLink.href = thisLink.href.replace(/javascript:\%20quickEdit\(([0-9]+).*/, "javascript: goToDetails($1, 1)"); | |
} | |
}, false); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment