TheDesk Mizuki (ver.5)
This commit is contained in:
@@ -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) {
|
||||
|
@@ -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)
|
||||
}
|
||||
|
||||
});
|
||||
|
Reference in New Issue
Block a user