Version 0.0.1
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..0b165c4
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2019 Adrià Vilanova Martínez (@avm99963)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
\ No newline at end of file
diff --git a/console_inject.js b/console_inject.js
new file mode 100644
index 0000000..5edc954
--- /dev/null
+++ b/console_inject.js
@@ -0,0 +1,36 @@
+function mutationCallback(mutationList, observer) {
+ mutationList.forEach((mutation) => {
+ if (mutation.type == "childList") {
+ mutation.addedNodes.forEach(function (node) {
+ if ((typeof node.classList !== "undefined") && node.classList.contains("view-more-button-container")) {
+ intersectionObserver.observe(node.querySelector(".view-more-button"));
+ }
+ });
+ }
+ });
+}
+
+function intersectionCallback(entries, observer) {
+ entries.forEach(entry => {
+ if (entry.isIntersecting) {
+ entry.target.click();
+ }
+ });
+};
+
+var observerOptions = {
+ childList: true,
+ attributes: true,
+ subtree: true
+}
+
+var mutationObserver = new MutationObserver(mutationCallback);
+mutationObserver.observe(document.querySelector(".scrollable-content"), observerOptions);
+
+var intersectionOptions = {
+ root: document.querySelector('.scrollable-content'),
+ rootMargin: '0px',
+ threshold: 1.0
+}
+
+var intersectionObserver = new IntersectionObserver(intersectionCallback, intersectionOptions);
\ No newline at end of file
diff --git a/icons/512.png b/icons/512.png
new file mode 100644
index 0000000..3ad2dcc
--- /dev/null
+++ b/icons/512.png
Binary files differ
diff --git a/manifest.json b/manifest.json
new file mode 100644
index 0000000..aca337d
--- /dev/null
+++ b/manifest.json
@@ -0,0 +1,23 @@
+{
+ "manifest_version": 2,
+ "name": "Infinite Scroll in Tailwind",
+ "version": "0.0.1",
+ "description": "Get infinite Scroll in Tailwind and the Community Console",
+ "icons": {
+ "512": "icons/512.png"
+ },
+ "content_scripts": [
+ {
+ "matches": ["https://support.google.com/s/community*"],
+ "js": ["console_inject.js"]
+ },
+ {
+ "matches": ["https://support.google.com/*/threads*"],
+ "js": ["tailwind_inject.js"]
+ }
+ ],
+ "permissions": [
+ "https://support.google.com/s/community*",
+ "https://support.google.com/*/threads*"
+ ]
+}
\ No newline at end of file
diff --git a/tailwind_inject.js b/tailwind_inject.js
new file mode 100644
index 0000000..c99c84e
--- /dev/null
+++ b/tailwind_inject.js
@@ -0,0 +1,15 @@
+function intersectionCallback(entries, observer) {
+ console.log(entries);
+ entries.forEach(entry => {
+ if (entry.isIntersecting) {
+ entry.target.click();
+ }
+ });
+};
+
+var intersectionOptions = {
+ threshold: 1.0
+}
+
+var intersectionObserver = new IntersectionObserver(intersectionCallback, intersectionOptions);
+intersectionObserver.observe(document.querySelector(".thread-list-threads__load-more-button"));
\ No newline at end of file