remove 'curl' command and fix links

This commit is contained in:
Franek 2024-06-18 21:13:07 +02:00
parent 1abb2213bd
commit 69de1a5001
No known key found for this signature in database
GPG Key ID: 0329F871B2079351
2 changed files with 1 additions and 30 deletions

View File

@ -128,32 +128,6 @@ const COMMANDS = [
.map(([name, url]) => `<a href="${url}" target="_blank">${name}</a>`)
.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',
description: 'Show some desktop screenshots',

View File

@ -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 = {
'gitea': 'https://git.sador.me/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',
'matrix': 'matrix.sador.me'
}
const MUSIC_METADATA = [