From c822302497e9f78a9f1bf9da818e6b90796bc2fe Mon Sep 17 00:00:00 2001 From: Petter Rasmussen Date: Wed, 13 Apr 2022 10:30:37 +0200 Subject: [PATCH] Add window id to tab info --- chrome-cli/App.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/chrome-cli/App.m b/chrome-cli/App.m index ee9a057..7821b83 100644 --- a/chrome-cli/App.m +++ b/chrome-cli/App.m @@ -700,6 +700,7 @@ - (void)printInfo:(chromeTab *)tab { if (self->outputFormat == kOutputFormatJSON) { NSDictionary *output = @{ @"id" : @(tab.id), + @"windowId" : @([self activeWindow].id), @"title" : tab.title, @"url" : tab.URL, @"loading" : @(tab.loading), @@ -707,6 +708,7 @@ - (void)printInfo:(chromeTab *)tab { [self printJSON:output]; } else { printf("Id: %ld\n", (long)tab.id); + printf("Window id: %ld\n", (long)[self activeWindow].id); printf("Title: %s\n", tab.title.UTF8String); printf("Url: %s\n", tab.URL.UTF8String); printf("Loading: %s\n", tab.loading ? "Yes" : "No");