From 432646fb52515f243955994a6a2b6214ba26d512 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Tue, 1 Mar 2016 10:55:23 -0500 Subject: [PATCH] Update source to work better with lazy-loading sites A site such as Facebook, which has infinite scroll, will not change new instances of "the cloud" when the user scrolls down and more posts are added to the newsfeed. By adding an event listener, we can also target such instances and thus get even closer to the dream of true 100% aerosol-rectal conversion. --- Source/content_script.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/content_script.js b/Source/content_script.js index e7abb388..c0d0df14 100644 --- a/Source/content_script.js +++ b/Source/content_script.js @@ -1,4 +1,6 @@ -walk(document.body); +document.addEventListener("DOMNodeInserted", function(e) { + walk(document.body); +}, false); function walk(node) {