From dd034e9a231128a12158d00bb3d2e8d2d4c48075 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Oliva?= Date: Tue, 27 Mar 2018 10:10:53 +0200 Subject: [PATCH] Rerun when github changes view (Removes our tree) --- app/app.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/app.js b/app/app.js index 69c489c..1376542 100644 --- a/app/app.js +++ b/app/app.js @@ -14,7 +14,7 @@ $(window).scroll(() => { function start() { var oldLocation; setInterval(() => { - if(location.origin + location.pathname != oldLocation) { + if(!$('.gct-folder-name').length) { oldLocation = location.origin + location.pathname; urlPullRegex = /(http|https):\/\/(www\.)?github\.com\/[-a-zA-Z0-9]*\/[-a-zA-Z0-9]*\/pull\/[0-9]*\/(files|commits)/; @@ -31,7 +31,6 @@ function start() { function initialSetup() { if ($('.js-diff-progressive-spinner').length || !$('#files').length) { - setTimeout(initialSetup, 100); return; }