Skip to content
This repository was archived by the owner on Jan 8, 2022. It is now read-only.

Commit 25ac28f

Browse files
committed
fix lint
1 parent 3acf2ef commit 25ac28f

File tree

1 file changed

+34
-30
lines changed

1 file changed

+34
-30
lines changed

app/renderer/main.js

Lines changed: 34 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -104,37 +104,41 @@ function createWebView() {
104104
window: webview,
105105
showInspectElement: true,
106106
append(props, win) {
107-
const hasText = props.selectionText.trim().length > 0
108-
return [
109-
{
110-
id: 'showDefinition',
111-
label: 'Show definition',
112-
enabled: hasText && isMac,
113-
visible: hasText && isMac,
114-
click() {
115-
win.showDefinitionForSelection()
116-
}
117-
},
118-
{
119-
id: 'searchGoogle',
120-
label: 'Search in Google',
121-
enabled: hasText,
122-
visible: hasText,
123-
click() {
124-
shell.openExternal(`https://www.google.com/search?q=${props.selectionText}`)
125-
}
126-
},
127-
{
128-
id: 'searchDuck',
129-
label: 'Search in DuckDuckGo',
130-
enabled: hasText,
131-
visible: hasText,
132-
click() {
133-
shell.openExternal(`https://duckduckgo.com/?q=${props.selectionText}`)
134-
}
107+
const hasText = props.selectionText.trim().length > 0
108+
return [
109+
{
110+
id: 'showDefinition',
111+
label: 'Show definition',
112+
enabled: hasText && isMac,
113+
visible: hasText && isMac,
114+
click() {
115+
win.showDefinitionForSelection()
135116
}
136-
]
137-
}
117+
},
118+
{
119+
id: 'searchGoogle',
120+
label: 'Search in Google',
121+
enabled: hasText,
122+
visible: hasText,
123+
click() {
124+
shell.openExternal(
125+
`https://www.google.com/search?q=${props.selectionText}`
126+
)
127+
}
128+
},
129+
{
130+
id: 'searchDuck',
131+
label: 'Search in DuckDuckGo',
132+
enabled: hasText,
133+
visible: hasText,
134+
click() {
135+
shell.openExternal(
136+
`https://duckduckgo.com/?q=${props.selectionText}`
137+
)
138+
}
139+
}
140+
]
141+
}
138142
})
139143
})
140144

0 commit comments

Comments
 (0)