Skip to content
This repository has been archived by the owner on Oct 14, 2022. It is now read-only.

Commit

Permalink
Move "_ " to ". " replacement outside of uncommaAuthors
Browse files Browse the repository at this point in the history
Since calibre drops . and it makes things look awkward with _ instead.
  • Loading branch information
scooterpsu committed Mar 31, 2021
1 parent 0b810d7 commit e19a0c6
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions comixology2/themeScript.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ loadScript(proxyPrefix+"/theme/settings.js", function(){
hideStoryTitles=true;
}
if(uncommaAuthors === null){
uncommaAuthors=true;
uncommaAuthors=false;
}
if(typeof Storage !== "undefined"){
if (localStorage.getItem('UbooquityThemeVariant') !== null) {
Expand Down Expand Up @@ -990,10 +990,12 @@ function containerWrap(wrapType){
$(this).parent().parent().attr('ID', index+1);
}
var fullLabel = $(this).text();
if((wrapType=="authors")&&(uncommaAuthors)){
var namePieces = fullLabel.split(', ');
fullLabel = namePieces[1]+' '+namePieces[0].trim();
fullLabel = fullLabel.replace("_",".");
if(wrapType=="authors"){
if(uncommaAuthors){
var namePieces = fullLabel.split(', ');
fullLabel = namePieces[1]+' '+namePieces[0].trim();
}
fullLabel = fullLabel.replace("_ ",". ");
}
console.log(location.href.indexOf('books') != -1);
if((!displayTitleInsteadOfFileName)&&(location.href.indexOf('books') == -1)){
Expand Down Expand Up @@ -1574,10 +1576,12 @@ function buildBreadcrumb(pageURL,pageNum){
$('.breadcrumb a:first-of-type').after(' > <a href="'+pageURL+'">'+label+'</a> ');
buildBreadcrumb(proxyPrefix+'/'+type+'/'+parent+'/',pageNum);
}else{
if((type=="books")&&(parent==booksBaseID)&&(uncommaAuthors)){
var namePieces = label.split(', ');
label = namePieces[1]+' '+namePieces[0].trim();
label = label.replace("_",".");
if((type=="books")&&(parent==booksBaseID)){
if(uncommaAuthors){
var namePieces = label.split(', ');
label = namePieces[1]+' '+namePieces[0].trim();
}
label = label.replace("_ ",". ");
}
$('.hinline').text(label);
if(parent){
Expand Down

0 comments on commit e19a0c6

Please sign in to comment.