Compare commits
3 Commits
8fd2aeb6a2
...
4c1789fc16
| Author | SHA1 | Date | |
|---|---|---|---|
| 4c1789fc16 | |||
| 082f7e926c | |||
| 6031cf06d4 |
@@ -1317,7 +1317,7 @@ class EBookReader {
|
||||
let spineWC = await Promise.all(
|
||||
this.book.spine.spineItems.map(async (item) => {
|
||||
let newDoc = await item.load(this.book.load.bind(this.book));
|
||||
let spineWords = newDoc.innerText.trim().split(/\s+/).length;
|
||||
let spineWords = (newDoc.innerText || "").trim().split(/\s+/).length;
|
||||
item.wordCount = spineWords;
|
||||
return spineWords;
|
||||
}),
|
||||
|
||||
6
flake.lock
generated
6
flake.lock
generated
@@ -20,11 +20,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1764522689,
|
||||
"narHash": "sha256-SqUuBFjhl/kpDiVaKLQBoD8TLD+/cTUzzgVFoaHrkqY=",
|
||||
"lastModified": 1769089682,
|
||||
"narHash": "sha256-9yA/LIuAVQq0lXelrZPjLuLVuZdm03p8tfmHhnDIkms=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "8bb5646e0bed5dbd3ab08c7a7cc15b75ab4e1d0f",
|
||||
"rev": "078d69f03934859a181e81ba987c2bb033eebfc5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
)
|
||||
|
||||
func searchAnnasArchive(query string) ([]SearchItem, error) {
|
||||
searchURL := "https://annas-archive.org/search?index=&q=%s&ext=epub&sort=&lang=en"
|
||||
searchURL := "https://annas-archive.li/search?index=&q=%s&ext=epub&sort=&lang=en"
|
||||
url := fmt.Sprintf(searchURL, url.QueryEscape(query))
|
||||
body, err := getPage(url)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user