diff --git a/icon/term.png b/icon/term.png index dcff3bc..9d06200 100644 Binary files a/icon/term.png and b/icon/term.png differ diff --git a/index.html b/index.html index 5e0a606..1b00943 100644 --- a/index.html +++ b/index.html @@ -6,8 +6,8 @@ - - + + diff --git a/js/terminal.js b/js/terminal.js index 26fa63c..b7fdab9 100755 --- a/js/terminal.js +++ b/js/terminal.js @@ -2,9 +2,10 @@ $(function() { var prompt = "[[b;#87cefa;]ai][[b;#FFFF00;]@aios] ~$ "; let url = new URL(window.location.href); - let u = url.searchParams.get('u'); - if (u) { - prompt = "[[b;#87cefa;]" + u + "][[b;#FFFF00;]@aios] ~$ "; + let user = url.searchParams.get('user'); + let id = url.searchParams.get('id'); + if (user) { + prompt = "[[b;#87cefa;]" + user + "][[b;#FFFF00;]@aios] ~$ "; }; var tab = "[[b;#87cefa;]]"; @@ -59,21 +60,22 @@ $(function() { \n⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠋⢀⠎⢠⠎⣠⣿⣿⣿⣿⣿⣿⣦⠀⡯⠀⠐⠧⠻⠛⠛⢋⢋⠋⠙⠛⠿⣿⢿⣷⡿⣿⣽⡿⠀⣷⠃⠀⣿⡿⣿⡿⣿⣽⣯⣷⣿⣿⡿⣿⣻⡇⢀⠹⣆⠘⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿\ "; - axios.get('https://card.syui.ai/json/card.json') - .then(function (response) { - all_card = JSON.stringify(response.data,null,"\t"); - }) + axios.get('https://api.syui.ai/users/' + id) + .then(function (response) { + user_data = JSON.stringify(response.data,null,"\t"); + }) axios.get('https://bsky.social/xrpc/com.atproto.repo.listRecords?repo=' + handle + '&collection=app.bsky.feed.post&limit=1') .then(function (response) { timeline = JSON.stringify(response.data.records[0].value,null,"\t"); - }) + }) axios.get('/json/ai.json') .then(function (response) { user_profile = JSON.stringify(response.data,null,"\t"); - }) + }) + var aiten_rank = user_all.aiten function print_slowly(term, paragraph, callback) { var foo, i, lines; lines = paragraph.split("\n"); @@ -110,12 +112,11 @@ $(function() { command = inputs[0]; if (inputs[0] === 'ai') { print_slowly(term, ascii_logo); - } else if (inputs[0] === 'w') { term.echo(user_profile); + } else if (inputs[0] === 'w') { + term.echo(user_data); } else if (inputs[0] === 'bsky') { print_slowly(term, timeline); - } else if (inputs[0] === 'card') { - term.echo(all_card); } else { term.error(command + " is not a valid command"); term.echo(command_all);