Fav ct had had bugs yet. and fix some bugs...(TheDesk Akane (16.0.3))

This commit is contained in:
cutls 2018-08-07 00:14:55 +09:00
parent b29da449f0
commit 1ac79f21ae
7 changed files with 47 additions and 21 deletions

View File

@ -40,6 +40,10 @@ var idata={
"imastodon.net_local":"楽屋",
"imastodon.net_notification":"ホワイトボード",
"imastodon.net_public":"ライブステージ",
"imastodon.net_post":"あふぅ",
"imastodon.net_fav":"の頭にティンときたようです",
"imastodon.net_bt":":「わかるわ」",
"imastodon.net_follow":"名刺をいただきました",
"mstdn.osaka":"instance",
"mstdn.osaka_name":"大阪丼",
"mstdn.osaka_letters":"500",
@ -49,6 +53,10 @@ var idata={
"mstdn.osaka_local":"近所",
"mstdn.osaka_notification":"あめちゃん",
"mstdn.osaka_public":"新世界",
"mstdn.osaka_post":"なんや!",
"mstdn.osaka_fav":"がええやん言いました",
"mstdn.osaka_bt":"がしばいた",
"mstdn.osaka_follow":"ツルまれました",
"mstdn.kemono-friends.info":"instance",
"mstdn.kemono-friends.info_name":"ますとどんちほー",
"mstdn.kemono-friends.info_letters":"1024",
@ -58,6 +66,9 @@ var idata={
"mstdn.kemono-friends.info_local":"ますとどんちほー",
"mstdn.kemono-friends.info_notification":"ねえねえ!",
"mstdn.kemono-friends.info_public":"ジャパリパーク",
"mstdn.kemono-friends.info_post":"がおー!",
"mstdn.kemono-friends.info_fav":":「すごーい」",
"mstdn.kemono-friends.info_bt":":「たーのしー」",
"itabashi.0j0.jp":"instance",
"itabashi.0j0.jp_name":"板橋丼",
"itabashi.0j0.jp_letters":"1024",
@ -77,7 +88,11 @@ var idata={
"misskey.xyz_name":"Misskey",
"misskey.xyz_letters":"1000",
"misskey.xyz_bbcode":"disabled",
"misskey.xyz_markdown":"enabled"
"misskey.xyz_markdown":"enabled",
"misskey.xyz_public":"Global",
"misskey.xyz_post":"Post",
"imastodon.net_fav":" reacted your post.",
"imastodon.net_bt":" reposted your post.",
};
localStorage.setItem("instance", JSON.stringify(idata));

View File

@ -310,7 +310,18 @@ function ckdb(acct_id) {
if(json[domain + "_notification"]){
localStorage.setItem("notification_" + acct_id, json[domain + "_notification"]);
}
if(json[domain + "_post"]){
localStorage.setItem("post_" + acct_id, json[domain + "_post"]);
}
if(json[domain + "_fav"]){
localStorage.setItem("fav_" + acct_id, json[domain + "_fav"]);
}
if(json[domain + "_bt"]){
localStorage.setItem("bt_" + acct_id, json[domain + "_bt"]);
}
if(json[domain + "_follow"]){
localStorage.setItem("follow_" + acct_id, json[domain + "_follow"]);
}
}
}

View File

@ -4,7 +4,11 @@ function mdCheck(){
var acct_id = $("#post-acct-sel").val();
var profimg=localStorage.getItem("prof_"+acct_id);
$("#acct-sel-prof").attr("src",profimg);
$("#toot-post-btn").text(lang_toot[lang]+"("+localStorage.getItem("domain_"+acct_id)+")");
if(localStorage.getItem("post_" + acct_id)){
$("#toot-post-btn").text(localStorage.getItem("post_" + acct_id)+"("+localStorage.getItem("domain_"+acct_id)+")");
}else{
$("#toot-post-btn").text(lang_toot[lang]+"("+localStorage.getItem("domain_"+acct_id)+")");
}
if(!localStorage.getItem("bb_"+acct_id) && !localStorage.getItem("md_"+acct_id)){
$(".markdown").addClass("hide");
$(".anti-markdown").addClass("hide");

View File

@ -190,6 +190,7 @@ function context(id, acct_id) {
console.error(error);
}).then(function(json) {
if(domain=="misskey.xyz"){
json.reverse();
console.log(json);
var templete = misskeyParse(json, '', acct_id,"","",[]);
$("#toot-reply").html(templete);

View File

@ -131,7 +131,7 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) {
if (mix == "notf") {
if (toot.type == "reply") {
var what = lang_parse_mentioned[lang];
var icon = '<i class="big-text fa fa-share teal"></i>';
var icon = '<i class="big-text fa fa-share teal-text"></i>';
} else if (toot.type == "renote") {
var what = lang_misskeyparse_renoted[lang];
var icon = '<i class="big-text fa fa-retweet light-blue-text"></i>';
@ -326,7 +326,7 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) {
content=content.replace(/<motion>(.+)<\/motion>/gi, '<span class="shake">$1</span>')
content=content.replace(/\*\*\*([^*]+)\*\*\*/gi, '<span class="shake" style="font-size:200%">$1</span>')
content=content.replace(/\*\*([^*]+)\*\*/gi, '<b>$1</b>')
content=content.replace(/^(.+)\s検索$/gmi, '<div class="input-field"><i class="material-icons prefix">search</i><input type="text" style="width:calc( 60% - 80px);" name="q" value="$1" id="srcbox_'+toot.id+'"><label for="src" data-trans="src" class="">検索</label><button class="btn waves-effect indigo" style="width:40%;" data-trans-i="src" onclick="goGoogle(\''+toot.id+'\')">検索</button></div>')
content=content.replace(/^(.+)\s(検索|search)$/gmi, '<div class="input-field"><i class="material-icons prefix">search</i><input type="text" style="width:calc( 60% - 80px);" name="q" value="$1" id="srcbox_'+toot.id+'"><label for="src" data-trans="src" class="">検索</label><button class="btn waves-effect indigo" style="width:40%;" data-trans-i="src" onclick="goGoogle(\''+toot.id+'\')">検索</button></div>')
content=content.replace(/\[(.+)\]\(<a href="(http(s)?:\/\/[\x21-\x7e]+)".+\)/gi,'<a href="$2" target="_blank">$1</a>');
content=twemoji.parse(content);

View File

@ -245,20 +245,21 @@ function notfToggle(acct, tlid) {
}
function notfCanceler(acct){
$(".notf-reply_" + acct).text(0);
localStorage.removeItem("notf-reply_" + acct_id)
localStorage.removeItem("notf-reply_" + acct)
$(".notf-reply_" + acct).addClass("hide");
$(".notf-fav_" + acct).text(0);
localStorage.removeItem("notf-fav_" + acct_id)
localStorage.removeItem("notf-fav_" + acct)
$(".notf-fav_" + acct).addClass("hide");
$(".notf-bt_" + acct).text(0);
localStorage.removeItem("notf-bt_" + acct_id)
localStorage.removeItem("notf-bt_" + acct)
$(".notf-bt_" + acct).addClass("hide");
$(".notf-follow_" + acct).text(0);
localStorage.removeItem("notf-follow_" + acct_id)
localStorage.removeItem("notf-follow_" + acct)
$(".notf-follow_" + acct).addClass("hide");
$(".notf-icon_" + acct).removeClass("red-text");
}
function allNotfRead(){
console.log(localStorage.getItem("notf-fav_2"));
var multi = localStorage.getItem("multi");
if (!multi) {
var obj = [{

View File

@ -157,18 +157,14 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter) {
} else if (toot.type == "reblog") {
var what = lang_parse_bted[lang];
var icon = "fa-retweet light-blue-text";
if(localStorage.getItem("domain_" + acct_id)=="imastodon.net" && !locale){
what = ":「わかるわ」";
}else if(localStorage.getItem("domain_" + acct_id)=="mstdn.osaka" && !locale){
what = "がしばきました";
if(!locale && localStorage.getItem("bt_" + acct_id)){
what = localStorage.getItem("bt_" + acct_id);
}
} else if (toot.type == "favourite") {
var what = lang_parse_faved[lang];
var icon = "fa-star yellow-text";
if(localStorage.getItem("domain_" + acct_id)=="imastodon.net" && !locale){
what = "の頭にティンときたようです";
}else if(localStorage.getItem("domain_" + acct_id)=="mstdn.osaka" && !locale){
what = "がええやんと言いました";
if(!locale && localStorage.getItem("fav_" + acct_id)){
what = localStorage.getItem("fav_" + acct_id);
}
}
var noticetext = '<span class="cbadge cbadge-hover"title="' + date(toot.created_at,
@ -637,10 +633,8 @@ function userparse(obj, auth, acct_id, tlid, popup) {
var auth = "";
}
var ftxt=lang_parse_followed[lang];
if(localStorage.getItem("domain_" + acct_id)=="imastodon.net" && !locale){
ftxt = "名刺をいただきました";
}else if(localStorage.getItem("domain_" + acct_id)=="mstdn.osaka" && !locale){
ftxt = "ツルまれました";
if(!locale && localStorage.getItem("follow_" + acct_id)){
ftxt = localStorage.getItem("follow_" + acct_id);
}
if(popup > 0 || popup==-1 || notf){
var notftext='<span class="cbadge" title="' + date(toot.created_at,