Styling and bugfixes

This commit is contained in:
Sriram Hariharan
2019-01-12 01:56:11 -06:00
parent 8e747290a8
commit 910f64038b
4 changed files with 16 additions and 9 deletions

View File

@@ -646,7 +646,11 @@ function prettifyTitle() {
}
/* Format the Professor Name */
function prettifyName() {
return profinit + ". " + profname.replace(/\w\S*/g, function (txt) {
var fixedprofinit = "";
if (profinit) {
fixedprofinit = profinit + ". ";
}
return fixedprofinit + profname.replace(/\w\S*/g, function (txt) {
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
});
}