fix some undif

This commit is contained in:
Cutls 2019-04-14 03:06:59 +09:00
parent d1968a2e69
commit 494a4e90d6
2 changed files with 12 additions and 10 deletions

View File

@ -161,14 +161,16 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) {
disname=""; disname="";
} }
//絵文字があれば //絵文字があれば
Object.keys(toot.user.emojis).forEach(function(key5) { if(toot.user.emojis){
var emoji = toot.user.emojis[key5]; Object.keys(toot.user.emojis).forEach(function(key5) {
var shortcode = emoji.name; var emoji = toot.user.emojis[key5];
var emoji_url = '<img draggable="false" src="' + emoji.url + var shortcode = emoji.name;
'" class="emoji-img" data-emoji="'+shortcode+'" alt=" :'+shortcode+': ">'; var emoji_url = '<img draggable="false" src="' + emoji.url +
var regExp = new RegExp(":" + shortcode + ":", "g"); '" class="emoji-img" data-emoji="'+shortcode+'" alt=" :'+shortcode+': ">';
dis_name = dis_name.replace(regExp, emoji_url); var regExp = new RegExp(":" + shortcode + ":", "g");
}); dis_name = dis_name.replace(regExp, emoji_url);
});
}
if (mix == "notf") { if (mix == "notf") {
if (gif == "yes") { if (gif == "yes") {
noticeavatar = toot.user.avatarUrl; noticeavatar = toot.user.avatarUrl;

View File

@ -233,13 +233,13 @@ function notfCommon(acct_id, tlid, sys) {
var ipc = electron.ipcRenderer; var ipc = electron.ipcRenderer;
var os = electron.remote.process.platform; var os = electron.remote.process.platform;
var options = { var options = {
body: ct+lang.lang_notf_new[lang], body: ct+lang.lang_notf_new,
icon: localStorage.getItem("prof_"+acct_id) icon: localStorage.getItem("prof_"+acct_id)
}; };
if(os=="darwin"){ if(os=="darwin"){
var n = new Notification('TheDesk:'+domain, options); var n = new Notification('TheDesk:'+domain, options);
}else{ }else{
ipc.send('native-notf', ['TheDesk:'+domain,ct+lang.lang_notf_new[lang],localStorage.getItem("prof_"+acct_id)]); ipc.send('native-notf', ['TheDesk:'+domain,ct+lang.lang_notf_new,localStorage.getItem("prof_"+acct_id)]);
} }
} }