blob: 0163f545f951ace83417edd4012fced948078ee4 [file] [log] [blame]
import {getOptions} from '../common/optionsUtils.js';
var intersectionObserver;
function intersectionCallback(entries, observer) {
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.click();
}
});
};
var intersectionOptions = {
threshold: 1.0,
};
getOptions('list').then(options => {
var button = document.querySelector('.thread-list-threads__load-more-button');
if (options.list && button !== null) {
intersectionObserver =
new IntersectionObserver(intersectionCallback, intersectionOptions);
intersectionObserver.observe(button);
}
});