Цитата:
|
DDim1000,
let key; const fn = () => { if(key) return; key = true; ....await fetch key = false; } |
Цитата:
collect_link_file(
window.scrollBy(0,10);
$(window).scroll(function() {
if($(window).scrollTop()+$(window).height()>=$(document).height())
{
........
alert("Сбор завершен!");
}
else{
collect_link_file();
}
}
);
|
DDim1000,
let key;
const fn = () => {
if(key) return;
key = true;
....await fetch
key = false;
}
$(window).scroll(function() {
if($(window).scrollTop()+$(window).height()>=$(document).height()) fn()
});
|
|
Почему-то ошибка: Uncaught SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
window.scrollBy(0,1810);
let key;
const fn = () => {
if(key) return;
key = true;
`
key = false;
}
$(window).scroll(function() {
if($(window).scrollTop()+$(window).height()>=$(document).height()) fn()
});
|
DDim1000,
замените let и const на var. |
| Часовой пояс GMT +3, время: 04:08. |