blob: a2209cd9613799551b84fcf98133d2989c59fe8e [file] [log] [blame]
var intersectionObserver;
function intersectionCallback(entries, observer) {
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.click();
}
});
};
var intersectionOptions = {
threshold: 1.0
}
chrome.storage.sync.get(null, function(items) {
var button = document.querySelector(".thread-list-threads__load-more-button");
if (items.list && button !== null) {
intersectionObserver = new IntersectionObserver(intersectionCallback, intersectionOptions);
intersectionObserver.observe(button);
}
});