The following is the code used in the Season 1 Episode 3: Slip Logic.
<font face="verdana">
<div id="LocalHolds">
<h2 style="margin-top:0px"><div id="Expiration">Expires: </div></h2>
<div id="RegularHolds">
<h1><div id="PatronID"></div></h1>
<div id="CardSegment">Last 2 digits of card: </div>
<h1 style="margin-top:20px">NOT CHECKED OUT</h1>
<font size="1">Please check this item out before leaving.</font>
</div>
<div id="HomeBoundHolds">
<h1>HOMEBOUND PATRON HOLD</h1>
Patron: <<borrowers.surname>>, <<borrowers.firstname>><br/>
Address: <<borrowers.address>><br/>
City: <<borrowers.city>><br/>
State: <<borrowers.state>><br/>
Zip: <<borrowers.zipcode>><br/>
Phone: <<borrowers.phone>><br/>
SMS: <<borrowers.smsalertnumber>><br/>
E-mail: <<borrowers.email>>
</div>
<h3 style="margin-top:400px"><div id="HoldAt">Hold at: <<branches.branchname>></div></h3>
</div>
<div id="TransferredHolds">
<h3 style="margin-top:20px">Transfer to</h3>
<h1><<branches.branchname>><br/>
<i><<branches.branchnotes>></i></h1>
<div style="margin-top:20px">
<b>Title: <<biblio.title>><br/>
Author: <<biblio.author>></b><br/>
Barcode: <<items.barcode>><br/>
Call No: <<items.itemcallnumber>><br/>
Transfer Date: <<today>>
</div>
<h3 style="margin-top:400px"><div id="SentFrom">Sent from: </div></h3>
</div>
<div id="ExpiredHolds">
<h2 style="margin-top:20px">HOLD EXPIRED</h2>
<div style="margin-top:20px">
<b>Title: <<biblio.title>><br/>
Author: <<biblio.author>></b><br/>
Barcode: <<items.barcode>><br/>
Call No: <<items.itemcallnumber>><br/>
<div id="ExpiredDate">Expired: </div>
</div>
</div>
</font>
<script>
var mask = "*";
var lastname = "<<borrowers.surname>>"
var firstname = "<<borrowers.firstname>>";
var cardnumber = "<<borrowers.cardnumber>>";
if (cardnumber == '') {
cardnumber = 'NULL'
}
var patroncategory = "<<borrowers.categorycode>>";
var partialname = lastname;
if (firstname != '') {
partialname += ", " + firstname.match(/\b./g).join('');
}
var transferto = "<<branches.branchname>>";
var expiration = '<<reserves.expirationdate>>'.substring(0, 5);
var expire = "[% hold.expirationdate %]";
var today = new Date();
today = new Date(today.getFullYear(), today.getMonth(), today.getDate());
var currentbranch = "[% USE Branches %] [% Branches.GetName( Branches.GetLoggedInBranchcode ) %]";
currentbranch = currentbranch.trim();
if (!(transferto == currentbranch)) {
document.getElementById("LocalHolds").style.display='none';
document.getElementById("ExpiredHolds").style.display='none';
document.getElementById("SentFrom").innerHTML += currentbranch;
} else {
document.getElementById("TransferredHolds").style.display='none';
document.getElementById("ExpiredHolds").style.display='none';
document.getElementById("PatronID").innerHTML=partialname;
if (cardnumber == 'NULL') {
document.getElementById("CardSegment").innerHTML = 'SELF REGISTERED - See Front Desk';
} else {
document.getElementById("CardSegment").innerHTML += mask.repeat(cardnumber.length-2) + cardnumber.slice(-2);
}
document.getElementById("Expiration").innerHTML += expiration;
if (patroncategory == "NOTHOME") {
document.getElementById("RegularHolds").style.display='none';
} else {
document.getElementById("HomeBoundHolds").style.display='none';
}
if (Date.parse(expire) < Date.parse(today)) {
document.getElementById("LocalHolds").style.display='none';
document.getElementById("ExpiredHolds").style.display='unset';
var expiredisplay = expire.split('-');
expiredisplay = expiredisplay[1] + '/' + expiredisplay[2] + '/' + expiredisplay[0];
document.getElementById("ExpiredDate").innerHTML += expiredisplay;
}
}
</script>
The modification that was shown to alter the way the patron name was displayed was done by altering the parialname variable in the logic:
var partialname = lastname.substring(0,3) + mask.repeat(lastname.length-3);
if (firstname != '') {
partialname += ", " + firstname.substring(0,3) + mask.repeat(firstname.length-3);
}