From 1fa61f43493c5ffb8781af1ff8cce3fa63976544 Mon Sep 17 00:00:00 2001 From: mauro-balades Date: Thu, 26 Sep 2024 18:58:59 +0200 Subject: [PATCH] Refactor ZenTabUnloader to simplify tab unloading condition --- src/ZenTabUnloader.mjs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/ZenTabUnloader.mjs b/src/ZenTabUnloader.mjs index 21a592c..8fd6edb 100644 --- a/src/ZenTabUnloader.mjs +++ b/src/ZenTabUnloader.mjs @@ -233,10 +233,7 @@ } const diff = currentTimestamp - lastActivity; // Check if the tab has been inactive for more than the timeout - if (diff < lazy.zenTabUnloaderTimeout * 60 * 1000) { - return false; - } - return true; + return diff > lazy.zenTabUnloaderTimeout * 60 * 1000; } }