From ab50bc57a41a65fa26730495d7a603a2f93bbd64 Mon Sep 17 00:00:00 2001 From: The Code Room <30334240+sqrtpapi2001@users.noreply.github.com> Date: Mon, 14 Oct 2019 22:48:25 -0400 Subject: [PATCH] Added semi-automatic rendering Added a semi-automatic rerender_all event listener for when you double click off a paragraph of interest. Behavior is still finicky: two separate code blocks can be unformatted at the same time upon clicking around + double clicking anywhere in the page body executes rerender_all yet it seems just single clicking in the sidebar also executes rerender_all. --- script.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/script.js b/script.js index 16e8e3d..9c44e82 100644 --- a/script.js +++ b/script.js @@ -40,5 +40,4 @@ window.addEventListener('keydown', function(e) { } }, true) -// I don't know a good way to trigger rerender automatically yet -//document.addEventListener('DOMContentLoaded', rerender_all, false); +window.addEventListener('click', function() {rerender_all()}, true)