Version 0.1.0.
Added infinite scroll to the public Forum threads, and added options page to adjust whether to enable infinite scrolling in thread lists and inside threads separately.
diff --git a/thread_inject.js b/thread_inject.js
new file mode 100644
index 0000000..0cbc254
--- /dev/null
+++ b/thread_inject.js
@@ -0,0 +1,21 @@
+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-all-replies__load-more-button");
+ if (items.thread && button !== null) {
+ intersectionObserver = new IntersectionObserver(intersectionCallback, intersectionOptions);
+ intersectionObserver.observe(button);
+ }
+});