mirror of
https://github.com/alexadam/save-as-ebook.git
synced 2025-09-12 02:14:40 +00:00
misc updates WIP
This commit is contained in:
parent
c39c62b8ec
commit
5d1ff43012
2 changed files with 53 additions and 120 deletions
|
@ -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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue