diff --git a/app/js/login/instance.js b/app/js/login/instance.js index 45122368..4ac052b7 100644 --- a/app/js/login/instance.js +++ b/app/js/login/instance.js @@ -66,7 +66,7 @@ var idata = { "misskey.io_post": "Post", "misskey.io_fav": " reacted your post.", "misskey.io_bt": " reposted your post.", - "misskey.dev": "misskey.dev", + "misskey.dev": "misskey", "misskey.dev_name": "misskey.dev", "misskey.dev_letters": "1024", "misskey.dev_bbcode": "disabled", diff --git a/app/js/login/manager.js b/app/js/login/manager.js index c735e811..64eb9d8c 100644 --- a/app/js/login/manager.js +++ b/app/js/login/manager.js @@ -286,10 +286,6 @@ function support() { templete = '' + idata[key + "_name"] + '(' + key + ')'; $("#support").append(templete); - } else if (instance == "misskey") { - templete = '' + idata[key + "_name"] + '(' + key + ')'; - $("#support").append(templete); } }); } diff --git a/app/js/tl/parse.js b/app/js/tl/parse.js index 41530106..2b0da425 100644 --- a/app/js/tl/parse.js +++ b/app/js/tl/parse.js @@ -650,9 +650,10 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) { if (tagck) { Object.keys(toot.tags).forEach(function (key4) { var tag = toot.tags[key4]; + var featured = ' Feature ' tags = tags + '#' + tag.name + ':TL Toot ' + - 'Pin '; + 'Pin' + featured + ' '; }); tags = '
' + tags + '
'; } diff --git a/app/js/tl/tag.js b/app/js/tl/tag.js index 019d4560..6ac3ba5f 100644 --- a/app/js/tl/tag.js +++ b/app/js/tl/tag.js @@ -127,4 +127,27 @@ function autoToot(tag) { brInsert('#' + tag + " ") } favTag(); +} +//タグをフィーチャー +function tagFeature(name, acct_id){ + var domain = localStorage.getItem("domain_" + acct_id); + var at = localStorage.getItem("acct_" + acct_id + "_at"); + var start = "https://" + domain + "/api/v1/featured_tags" + fetch(start, { + method: 'POST', + headers: { + 'content-type': 'application/json', + 'Authorization': 'Bearer ' + at + }, + body: JSON.stringify({ + name: name + }) + }).then(function (response) { + return response.json(); + }).catch(function (error) { + return false; + }).then(function (json) { + console.log(json) + M.toast({ html: "Complete: " + escapeHTML(name), displayLength: 3000 }) + }); } \ No newline at end of file