From a71d2fa2260063b20d6e9c8ca7496763327f59d1 Mon Sep 17 00:00:00 2001 From: tophf Date: Thu, 7 Dec 2017 11:10:32 +0300 Subject: [PATCH] ...even less eager --- content/apply.js | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/content/apply.js b/content/apply.js index 88ac2d29..5f3f4769 100644 --- a/content/apply.js +++ b/content/apply.js @@ -459,7 +459,11 @@ if (sorting) { sorting = false; docRootObserver.takeRecords(); - start(); + if (!restorationLimitExceeded()) { + start(); + } else { + setTimeout(start, 1000); + } } } function isMovable(el) { @@ -474,9 +478,6 @@ } function moveAfter(el, expected) { if (!sorting) { - if (restorationLimitExceeded()) { - return false; - } sorting = true; docRootObserver.stop(); } @@ -493,11 +494,7 @@ restorationCounter = 0; } lastRestorationTime = t; - if (++restorationCounter > 10) { - sorting = false; - setTimeout(start, 1000); - return true; - } + return ++restorationCounter > 2; } } })();