TheDesk Mizuki (ver.5)

This commit is contained in:
cutls
2018-04-08 23:17:33 +09:00
parent 57079a7b93
commit 589945a1a4
16 changed files with 246 additions and 34 deletions

View File

@@ -13,6 +13,13 @@ function additional(acct_id, tlid) {
var urls = text.match(
/https?:\/\/([-a-zA-Z0-9@.]+)\/media\/([-_.!~*\'()a-zA-Z0-9;\/?:\@&=+\$,%#]+)/
);
//トゥートのURLぽかったら
toot = text.match(/https:\/\/([a-zA-Z0-9.-]+)\/@([a-zA-Z0-9_]+)\/([0-9]+)/);
if(toot){
if(toot[1]){
$(this).attr("data-acct",acct_id);
}
}
if (urls) {
$(this).remove();
} else if (!card) {

View File

@@ -237,8 +237,8 @@ function brws(){
shell.openExternal(url);
}
//外部からトゥート開く
function detEx(url){
var domain = localStorage.getItem("domain_0");
function detEx(url,acct_id){
var domain = localStorage.getItem("domain_"+acct_id);
var at = localStorage.getItem(domain + "_at");
var start = "https://" + domain + "/api/v1/search?resolve=true&q="+url
fetch(start, {
@@ -261,7 +261,9 @@ function detEx(url){
shell.openExternal(url);
}else{
var id=json.statuses[0].id;
details(id, 0, 0)
$(".loadp").text($(".loadp").attr("href"));
$(".loadp").removeClass("loadp");
details(id, acct_id, 0)
}
});