Skip to content

Commit 79876ee

Browse files
committed
fix: windows shortcut toggle
1 parent 4c630ae commit 79876ee

File tree

2 files changed

+25
-23
lines changed

2 files changed

+25
-23
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "logcat-in-devtools",
3-
"version": "0.1.9",
3+
"version": "0.1.10",
44
"description": "View android adb logcat logs in chrome devtools console",
55
"homepage": "https://github.com/nieheyong/logcat-in-devtools.git",
66
"repository": {

src/index.ts

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -72,28 +72,30 @@ function showInspectTips() {
7272

7373
stdWrite(tips);
7474

75-
if (shortcutOpen) {
76-
listenForKeypress([
77-
{
78-
ctrl: true,
79-
name: "a",
80-
action: () => {
81-
openInChrome("chrome://inspect");
82-
},
83-
},
84-
{
85-
ctrl: true,
86-
name: "b",
87-
action: () => {
88-
openInChrome(inspectUrl);
89-
},
90-
},
91-
{
92-
name: "s",
93-
action: togglePrint,
94-
},
95-
]);
96-
}
75+
listenForKeypress([
76+
{
77+
name: "s",
78+
action: togglePrint,
79+
},
80+
...(shortcutOpen
81+
? [
82+
{
83+
ctrl: true,
84+
name: "a",
85+
action: () => {
86+
openInChrome("chrome://inspect");
87+
},
88+
},
89+
{
90+
ctrl: true,
91+
name: "b",
92+
action: () => {
93+
openInChrome(inspectUrl);
94+
},
95+
},
96+
]
97+
: []),
98+
]);
9799
}
98100

99101
function run(cliOptions: CliOptions) {

0 commit comments

Comments
 (0)