1
0
This commit is contained in:
syui 2024-04-05 17:07:05 +09:00
parent af71ef3527
commit 16e92d9c1b
Signed by: syui
GPG Key ID: 5417CFEBAD92DF56

View File

@ -60,7 +60,7 @@ $(function() {
"; ";
let list = 'https://bsky.social/xrpc/com.atproto.repo.listRecords?repo='; let list = 'https://bsky.social/xrpc/com.atproto.repo.listRecords?repo=';
axios.get(list + handle + '&collection=app.bsky.feed.post&limit=1') axios.get(list + did + '&collection=app.bsky.feed.post&limit=1')
.then(function (response) { .then(function (response) {
timeline = JSON.stringify(response.data.records[0].value,null,"\t"); timeline = JSON.stringify(response.data.records[0].value,null,"\t");
}) })
@ -82,10 +82,14 @@ $(function() {
bsky_did = JSON.stringify(response.data,null,"\t"); bsky_did = JSON.stringify(response.data,null,"\t");
}) })
axios.get('/json/ai.json') function test_json() {
var u;
u = axios.get('/json/ai.json')
.then(function (response) { .then(function (response) {
user_profile = JSON.stringify(response.data,null,"\t"); return JSON.stringify(response.data,null,"\t");
}) })
return u;
}
function print_slowly(term, paragraph, callback) { function print_slowly(term, paragraph, callback) {
var foo, i, lines; var foo, i, lines;
@ -123,8 +127,7 @@ $(function() {
command = inputs[0]; command = inputs[0];
if (inputs[0] === 'ai') { if (inputs[0] === 'ai') {
print_slowly(term, ascii_logo); print_slowly(term, ascii_logo);
term.echo(user_profile); term.echo(test_json());
} else if (inputs[0] === 'plc' && inputs[1] != undefined) { } else if (inputs[0] === 'plc' && inputs[1] != undefined) {
url = desc + inputs[1] + '&collection=app.bsky.actor.profile'; url = desc + inputs[1] + '&collection=app.bsky.actor.profile';
$.ajaxSetup({async: false}); $.ajaxSetup({async: false});