From f26eb0388870e26a5716b3aa043795da70029a9d Mon Sep 17 00:00:00 2001 From: ccd0 Date: Thu, 22 Aug 2019 15:09:19 -0700 Subject: [PATCH] Suggest disabling JSON Index if catalog.json is loading slowly. #2412 --- src/General/Index.coffee | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/General/Index.coffee b/src/General/Index.coffee index 8de81dd4c..4830517c5 100644 --- a/src/General/Index.coffee +++ b/src/General/Index.coffee @@ -583,10 +583,13 @@ Index = if Conf['Index Refresh Notifications'] # Optional notification for manual refreshes Index.notice or= new Notice 'info', 'Refreshing index...' + Index.nTimeout or= setTimeout -> + Index.notice?.el.lastElementChild.textContent += ' (disable JSON Index if this takes too long)' + , 3 * $.SECOND else # Also display notice if Index Refresh is taking too long Index.nTimeout or= setTimeout -> - Index.notice or= new Notice 'info', 'Refreshing index...' + Index.notice or= new Notice 'info', 'Refreshing index... (disable JSON Index if this takes too long)' , 3 * $.SECOND # Hard refresh in case of incomplete page load.