Skip to content

Commit

Permalink
Add window id to tab info
Browse files Browse the repository at this point in the history
  • Loading branch information
prasmussen committed Apr 13, 2022
1 parent 2537c62 commit c822302
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions chrome-cli/App.m
Original file line number Diff line number Diff line change
Expand Up @@ -700,13 +700,15 @@ - (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),
};
[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");
Expand Down

0 comments on commit c822302

Please sign in to comment.