remove 'curl' command and fix links
This commit is contained in:
parent
1abb2213bd
commit
69de1a5001
@ -128,32 +128,6 @@ const COMMANDS = [
|
|||||||
.map(([name, url]) => `<a href="${url}" target="_blank">${name}</a>`)
|
.map(([name, url]) => `<a href="${url}" target="_blank">${name}</a>`)
|
||||||
.join('\n')
|
.join('\n')
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: 'curl',
|
|
||||||
description: 'open website in new tab',
|
|
||||||
usage: '<website>',
|
|
||||||
usage_examples: ['curl https://google.com'],
|
|
||||||
arguments: [
|
|
||||||
{
|
|
||||||
name: 'url',
|
|
||||||
description: 'URL to open',
|
|
||||||
required: true,
|
|
||||||
multiword: true,
|
|
||||||
check: (url) => URL_REGEX.test(url)
|
|
||||||
? null
|
|
||||||
: "invalid URL or missing protocol"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
output: (url) => {
|
|
||||||
Object.assign(document.createElement('a'), {
|
|
||||||
target: '_blank',
|
|
||||||
rel: 'noopener noreferrer',
|
|
||||||
href: url,
|
|
||||||
}).click();
|
|
||||||
|
|
||||||
return ''
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: 'desktop',
|
name: 'desktop',
|
||||||
description: 'Show some desktop screenshots',
|
description: 'Show some desktop screenshots',
|
||||||
|
@ -1,11 +1,8 @@
|
|||||||
const URL_REGEX = /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/g;
|
|
||||||
|
|
||||||
const LINKS = {
|
const LINKS = {
|
||||||
'gitea': 'https://git.sador.me/sadorowo',
|
'gitea': 'https://git.sador.me/sadorowo',
|
||||||
'instagram': 'https://instagram.com/sadorowo',
|
'instagram': 'https://instagram.com/sadorowo',
|
||||||
'immich (self-hosted photo hosting)': 'https://photos.sador.me/',
|
'matrix': 'https://matrix.sador.me',
|
||||||
'email': 'mailto:contact@sador.me',
|
'email': 'mailto:contact@sador.me',
|
||||||
'matrix': 'matrix.sador.me'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const MUSIC_METADATA = [
|
const MUSIC_METADATA = [
|
||||||
|
Loading…
Reference in New Issue
Block a user