From c30d063499d52d9b892a96c0d1ac0a168abcab37 Mon Sep 17 00:00:00 2001 From: Oleksii Nazarenko Date: Mon, 4 Nov 2024 15:39:27 +0000 Subject: [PATCH] ViewArchiveCommand: extra keywords + hide for some pages --- src/features/command/ViewArchiveCommand.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/features/command/ViewArchiveCommand.tsx b/src/features/command/ViewArchiveCommand.tsx index acdf8f1..04102cc 100644 --- a/src/features/command/ViewArchiveCommand.tsx +++ b/src/features/command/ViewArchiveCommand.tsx @@ -13,9 +13,10 @@ const COMMAND_KEYWORDS = [ "time", "travel", "archive", - "back", "previous", "go", + "back", + "go back", "history", ] @@ -23,6 +24,13 @@ export default function ViewArchiveCommand() { const currentUrl = window.location.toString() const currentUrlSegments = extractUrlSegments(currentUrl) + if ( + currentUrlSegments[0] === "_this_session" || + currentUrlSegments[0] === "icons" + ) { + return null + } + if ( currentUrlSegments[0] && getSegmentType(currentUrlSegments[0]) === "archive"