Skip to content

Instantly share code, notes, and snippets.

Created May 26, 2015 17:07
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save mreidsma/94e7e86a3b3d98fa8062 to your computer and use it in GitHub Desktop.
Sierra's Failed Renewal Messages Stink

Fixing the unhelpful renewal failed message in Sierra

This little script puts the failed renewal message in a more intuitive place, and lets you customize the text. This is the before and after of GVSU's OPAC:

Before and after of this script

if(document.getElementById('renewfailmsg') != 'undefined' && document.getElementById('renewfailmsg') != null) {
// Renewal failed by III makes it hard to see
var renewalFailText = document.getElementById('renewfailmsg').innerText;
// Get rid of the see details below part.
var renewalMessage = renewalFailText.split('. ');
var renewalError = document.createElement('div');
renewalError.className = 'lib-error'; = 'both'; = '1em';
renewalError.innerHTML = '<b>' + renewalMessage[0] + '.</b> (This usually means that someone else has recalled the book, or you&#8217;ve renewed it several times already.)';
var accountTools = document.getElementById('myaccount-tools');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment