mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
d
This commit is contained in:
parent
55660af790
commit
899d7cdb41
2 changed files with 5 additions and 1249 deletions
1245
searx/webapp.py
1245
searx/webapp.py
File diff suppressed because one or more lines are too long
|
@ -1327,7 +1327,7 @@ function modal_open(url, num)
|
|||
while (!stopLoop && iframe.contentWindow.PDFViewerApplication.pdfDocument==null) {
|
||||
if (Date.now() - startTime > 30000) {
|
||||
stopLoop = true;
|
||||
modalele = ['这是一个PDF文档,加载失败了']
|
||||
}
|
||||
}
|
||||
var pdf = iframe.contentWindow.PDFViewerApplication.pdfDocument;
|
||||
var numPages = pdf.numPages; //获取总页数
|
||||
|
@ -1480,14 +1480,13 @@ function modal_open(url, num)
|
|||
console.error(error); //处理错误情况
|
||||
});
|
||||
modalele = ['这是一个PDF文档']
|
||||
if(stopLoop = true) modalele = ['这是一个PDF文档,但是加载失败了']
|
||||
sentencesContent = ''
|
||||
for (let i = 0; i < sentences.length; i++) {
|
||||
sentencesContent += sentences[i][1];
|
||||
}
|
||||
article = {'textContent':sentencesContent,'title':iframe.contentWindow.PDFViewerApplication._title}
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
modalele = eleparse(iframe.contentDocument);
|
||||
|
|
Loading…
Add table
Reference in a new issue