mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
c
This commit is contained in:
parent
2b473a701d
commit
a297b2ee7d
2 changed files with 20 additions and 3 deletions
File diff suppressed because one or more lines are too long
|
@ -1366,7 +1366,24 @@ function modal_open(url, num)
|
||||||
iframePromise.then(
|
iframePromise.then(
|
||||||
() => {
|
() => {
|
||||||
|
|
||||||
|
|
||||||
|
const iframeDoc = iframe.contentDocument || iframe.contentWindow.document;
|
||||||
|
const links = iframeDoc.getElementsByTagName('a');
|
||||||
|
|
||||||
|
for (let i = 0; i < links.length; i++) {
|
||||||
|
if(!links[i].href) continue;
|
||||||
|
links[i].addEventListener('click', function(event) {
|
||||||
|
if (window.lock_chat === 1) {
|
||||||
|
event.preventDefault();
|
||||||
|
alert('请耐心等待上一个会话结束');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
modal_open(links[i].href, 'URL');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
document.querySelector("#modal-input-content").appendChild(document.querySelector("#chat_talk"))
|
document.querySelector("#modal-input-content").appendChild(document.querySelector("#chat_talk"))
|
||||||
document.querySelector("#modal-input-content").appendChild(document.querySelector("#chat_continue"))
|
document.querySelector("#modal-input-content").appendChild(document.querySelector("#chat_continue"))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue