Skip to content

Instantly share code, notes, and snippets.

@mreidsma
Created June 26, 2013 16:42
Show Gist options
  • Select an option

  • Save mreidsma/5869083 to your computer and use it in GitHub Desktop.

Select an option

Save mreidsma/5869083 to your computer and use it in GitHub Desktop.
Make Illiad renewal confirmations less terrible.
$(document).ready(function() {
// Assumes you are using jQuery.
if($(".statusNormal").length > 0 && $(".statusNormal:last-child").text() == "There can be no further renewals.") {
// This is the page you see when you've renewed an item. The dialogs are terrible.
// Let's fix that.
// Get the due date
var firstAlert = $(".statusNormal:first-child").text();
var alertChunks = firstAlert.split(" ");
var dueDate = alertChunks[7];
// Now hide the terrible status alerts
$(".statusNormal").hide();
// Add a nice new one.
var newAlert = '<span class="lib-success" style="margin-bottom: 0;"><b>Got it!</b> We&#8217;ll ask the library we borrowed this from if you can have it until <b>' + dueDate + '</b><br />They probably will. We&#8217;ll email you only if they need it back now.</span>';
// Put it on the page
$("#status").prepend(newAlert);
}
});

Make Illiad's renewal confirmations less terrible

We use Illiad for ILL, and have heavily modified it. One thing that came up this week was how bad the renewal confirmations are. I wrote a quick script to fix that. Here's what it does:

Default renewal confirmation screen at GVSU:

Original Illiad Screen

Why yes, it is useful to have 2 separate alerts there. Thank you.

New confirmation screen at GVSU

Revised Illiad Screen

Oh hey! Maybe there are people behind this service, and not robots.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment