This commit is contained in:
Joseph Cheung 2023-03-01 18:45:55 +08:00
parent fe6e7a556a
commit 6d5580e50d
2 changed files with 866 additions and 2 deletions

File diff suppressed because one or more lines are too long

View file

@ -1230,10 +1230,14 @@ function modal_open(url, num)
var iframe = document.querySelector("#iframe-wrapper > iframe");
let modalele = eleparse(iframe.contentDocument);
let article = new Readability(iframe.contentDocument.cloneNode(true)).parse();
let fulltext = article.textContent;
fulltext.replaceAll("\n\n","\n").replaceAll("\n\n","\n");
const delimiter = /[?!;\?\n]/g
fulltext = fulltext.split(delimiter);
optkeytext = {
method: "POST",
headers: headers,
body: JSON.stringify({'text':article.textContent})
body: JSON.stringify({'text':fulltext.join("\n")})
};
fetchRetry('https://search.kg/keytext',3,optkeytext)
.then(response => response.json())