Skip to content

Commit 04c3440

Browse files
authored
tweak
The reason for that last bit in the conditional is to not impose title case where the title is already properly cased, i.e. not in all caps
1 parent d49efa6 commit 04c3440

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Old Bailey Online.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,11 @@ if (url.includes('browse.jsp') && ( url.includes('div=OA') || url.includes('nam
9393

9494
newItem.date = ZU.strToISO(sessDate);
9595

96-
if (newItem.itemType == "case" && trialTitle ) {
96+
if (newItem.itemType == "case" && trialTitle && trialTitle == trialTitle.toUpperCase()) {
9797
newItem.title = ZU.capitalizeTitle(trialTitle, true); // todo tidying this up - sometimes no name, messy punctuation
9898
} else if (newItem.itemType == "book") {
9999
newItem.title = trialTitle + " " + sessDate;
100-
}
100+
}
101101

102102
var referenceNo = ZU.xpathText(doc, '//div[@class="ob-panel"][1]/table[@class="ob-info-table"][1]/tbody/tr[th[contains(text(),"Reference")]]/td').trim(); // changed fetching Reference number
103103

0 commit comments

Comments
 (0)