From 4cfdc4c51303887e350168f5803875f147fb5125 Mon Sep 17 00:00:00 2001 From: ed Date: Tue, 3 Dec 2024 02:13:12 +0000 Subject: [PATCH] preserve active sort-prefs if more specific than url-hash --- copyparty/web/browser.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index a91a41f0..c4cc0290 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -2201,9 +2201,10 @@ if (window.og_fn) { t = "int"; ret.push([z, n, t]); } + n = Math.min(ret.length, 2) var cmp = jread('fsort', []); - if (JSON.stringify(ret.slice(0, 2) != - JSON.stringify(cmp.slice(0, 2)))) + if (JSON.stringify(ret.slice(0, n) != + JSON.stringify(cmp.slice(0, n)))) jwrite('fsort', ret); })();