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:
Created
May 26, 2015 17:07
-
-
Save mreidsma/94e7e86a3b3d98fa8062 to your computer and use it in GitHub Desktop.
Sierra's Failed Renewal Messages Stink
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
if(document.getElementById('renewfailmsg') != 'undefined' && document.getElementById('renewfailmsg') != null) { | |
// Renewal failed by III makes it hard to see | |
var renewalFailText = document.getElementById('renewfailmsg').innerText; | |
console.log(renewalFailText); | |
// Get rid of the see details below part. | |
var renewalMessage = renewalFailText.split('. '); | |
var renewalError = document.createElement('div'); | |
renewalError.className = 'lib-error'; | |
renewalError.style.clear = 'both'; | |
renewalError.style.marginTop = '1em'; | |
renewalError.innerHTML = '<b>' + renewalMessage[0] + '.</b> (This usually means that someone else has recalled the book, or you’ve renewed it several times already.)'; | |
var accountTools = document.getElementById('myaccount-tools'); | |
accountTools.appendChild(renewalError); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment