27 lines
464 B
JavaScript
27 lines
464 B
JavaScript
export async function cmd(inp, k) {
|
|
var search = ""
|
|
if (inp.indexOf(" ") > 0) {
|
|
search = inp.substring(inp.indexOf(" ") + 1)
|
|
}
|
|
|
|
if (k == 'Enter') {
|
|
window.open(`https://chatgpt.com/?q=${search}`, '_self');
|
|
}
|
|
|
|
return `
|
|
<pre>
|
|
press Enter to search chat.openai.com for: '${search}'
|
|
</pre>
|
|
`;
|
|
}
|
|
|
|
export let man = `
|
|
<pre>
|
|
GPT(1)
|
|
|
|
NAME
|
|
\tgpt - search chat.openai.com for something. You'll probably only get slop
|
|
\tbut it may have a chance of helping.
|
|
</pre>
|
|
`
|