update api

This commit is contained in:
xaoxuu 2022-11-06 15:15:14 +08:00
parent 56bb583fb1
commit af3dcdacf9
3 changed files with 3 additions and 3 deletions

View File

@ -17,7 +17,7 @@ hexo.extend.tag.register('friends', function(args) {
if (args.api) { if (args.api) {
api = args.api; api = args.api;
} else if (args.repo) { } else if (args.repo) {
api = 'https://data.json.vlts.cc/v2/' + args.repo; api = 'https://api.vlts.cc/output_data/v2/' + args.repo;
} }
var el = '<div class="tag-plugin users-wrap">'; var el = '<div class="tag-plugin users-wrap">';

View File

@ -17,7 +17,7 @@ hexo.extend.tag.register('sites', function(args) {
if (args.api) { if (args.api) {
api = args.api; api = args.api;
} else if (args.repo) { } else if (args.repo) {
api = 'https://data.json.vlts.cc/v2/' + args.repo; api = 'https://api.vlts.cc/output_data/v2/' + args.repo;
} }
var el = '<div class="tag-plugin sites-wrap">'; var el = '<div class="tag-plugin sites-wrap">';

View File

@ -33,7 +33,7 @@ function setCardLink(nodes) {
if (el.nodeType !== 1) return if (el.nodeType !== 1) return
el.removeAttribute('cardlink'); el.removeAttribute('cardlink');
const link = el.href; const link = el.href;
const api = 'https://site-info.vlts.cc/api?url='; const api = 'https://api.vlts.cc/site_info/v1?url=';
fetch(api + link).then(function(response) { fetch(api + link).then(function(response) {
if (response.ok) { if (response.ok) {
return response.json(); return response.json();