Skip to content

Instantly share code, notes, and snippets.

@choffee
Created February 22, 2012 13:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save choffee/1885201 to your computer and use it in GitHub Desktop.
Save choffee/1885201 to your computer and use it in GitHub Desktop.
Footprints replace quickEdit with the more useful Details
// ==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