misc updates WIP

This commit is contained in:
Alex Adam 2020-02-21 15:15:11 +02:00
parent c39c62b8ec
commit 5d1ff43012
2 changed files with 53 additions and 120 deletions

View file

@ -340,3 +340,14 @@ function getEbookFileName(name) {
.replace(/"/ig, '')
.replace(/'/ig, '');
}
function getPageUrl(url) {
return url.toLowerCase().replace(/\s+/g,'_').replace(/[^a-z0-9_]/g,'') + Math.floor(Math.random() * 10000) + '.xhtml';
}
function getPageTitle(title) {
if (title.trim().length === 0) {
return 'ebook';
}
return title;
}