TheDesk Mizuki (ver.4)
This commit is contained in:
@@ -226,4 +226,44 @@ function trans(tar){
|
||||
}).then(function(text) {
|
||||
$("#toot-this .additional").html('<span class="gray">'+text+'</span>');
|
||||
});
|
||||
}
|
||||
//ブラウザで開く
|
||||
function brws(){
|
||||
var url=$("#tootmodal").attr("data-url");
|
||||
const {
|
||||
shell
|
||||
} = require('electron');
|
||||
|
||||
shell.openExternal(url);
|
||||
}
|
||||
//外部からトゥート開く
|
||||
function detEx(url){
|
||||
var domain = localStorage.getItem("domain_0");
|
||||
var at = localStorage.getItem(domain + "_at");
|
||||
var start = "https://" + domain + "/api/v1/search?resolve=true&q="+url
|
||||
fetch(start, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'content-type': 'application/json',
|
||||
'Authorization': 'Bearer ' + at
|
||||
}
|
||||
}).then(function(response) {
|
||||
return response.json();
|
||||
}).catch(function(error) {
|
||||
todo(error);
|
||||
console.error(error);
|
||||
}).then(function(json) {
|
||||
if(!json.statuses){
|
||||
const {
|
||||
shell
|
||||
} = require('electron');
|
||||
|
||||
shell.openExternal(url);
|
||||
}else{
|
||||
var id=json.statuses[0].id;
|
||||
details(id, 0, 0)
|
||||
}
|
||||
|
||||
});
|
||||
return;
|
||||
}
|
@@ -442,6 +442,9 @@ function parse(obj, mix, acct_id, tlid, popup) {
|
||||
'\')" class="waves-effect waves-dark btn-flat" style="padding:0" title="このトゥートをブースト"><i class="text-darken-3 fa fa-retweet ' +
|
||||
if_rt + ' rt_' + toot.id + '"></i><span class="rt_ct">' + toot.reblogs_count +
|
||||
'</span></a></div>' +
|
||||
'<div class="action '+can_rt+'"><a onclick="qt(\'' + toot.id + '\',' + acct_id +
|
||||
',\'' + toot.account.acct +'\',\''+toot.url+
|
||||
'\')" class="waves-effect waves-dark btn-flat" style="padding:0" title="このトゥートを引用"><i class="text-darken-3 fa fa-quote-right"></i></a></div>' +
|
||||
'<div class="action"><a onclick="fav(\'' + toot.id + '\',' + acct_id +
|
||||
',\'' + tlid +
|
||||
'\')" class="waves-effect waves-dark btn-flat" style="padding:0" title="このトゥートをお気に入り登録"><i class="fa text-darken-3 fa-star' +
|
||||
|
Reference in New Issue
Block a user