TheDesk Mio (ver.4) mac modify
This commit is contained in:
@@ -34,7 +34,17 @@ function notf(acct_id, tlid, sys) {
|
||||
}
|
||||
var electron = require("electron");
|
||||
var ipc = electron.ipcRenderer;
|
||||
ipc.send('native-notf', ['TheDesk:'+domain,ct+"件の新しい通知",localStorage.getItem("prof_"+acct_id)]);
|
||||
var os = electron.remote.process.platform;
|
||||
var options = {
|
||||
body: ct+"件の新しい通知",
|
||||
icon: tlocalStorage.getItem("prof_"+acct_id)
|
||||
};
|
||||
if(os=="darwin"){
|
||||
var n = new Notification('TheDesk:'+domain, options);
|
||||
}else{
|
||||
ipc.send('native-notf', ['TheDesk:'+domain,ct+"件の新しい通知",localStorage.getItem("prof_"+acct_id)]);
|
||||
}
|
||||
|
||||
}
|
||||
if(obj.type!="follow"){
|
||||
templete = templete+parse([obj], 'notf', acct_id, 'notf', -1);
|
||||
|
@@ -174,20 +174,22 @@ function parse(obj, mix, acct_id, tlid, popup) {
|
||||
if (popup >= 0 && obj.length < 5 && noticetext != memory) {
|
||||
var domain = localStorage.getItem("domain_" + acct_id);
|
||||
if(popup>0){
|
||||
if(native=="yes"){
|
||||
var electron = require("electron");
|
||||
var ipc = electron.ipcRenderer;
|
||||
var options = {
|
||||
body: toot.account.display_name+"(" + toot.account.acct +")"+what+"\n\n"+$.strip_tags(toot.status.content),
|
||||
icon: toot.account.avatar
|
||||
};
|
||||
var n = new Notification('TheDesk:'+domain, options);
|
||||
|
||||
console.log(n);
|
||||
//ipc.send('native-notf', ['TheDesk:'+domain,toot.account.display_name+"(" + toot.account.acct +")"+what+"\n\n"+$.strip_tags(toot.status.content),toot.account.avatar]);
|
||||
}
|
||||
Materialize.toast("["+domain+"より]"+escapeHTML(toot.account.display_name)+what, popup * 1000);
|
||||
}
|
||||
if(native=="yes"){
|
||||
var electron = require("electron");
|
||||
var ipc = electron.ipcRenderer;
|
||||
var os = electron.remote.process.platform;
|
||||
var options = {
|
||||
body: toot.account.display_name+"(" + toot.account.acct +")"+what+"\n\n"+$.strip_tags(toot.status.content),
|
||||
icon: toot.account.avatar
|
||||
};
|
||||
if(os=="darwin"){
|
||||
var n = new Notification('TheDesk:'+domain, options);
|
||||
}else{
|
||||
ipc.send('native-notf', ['TheDesk:'+domain,toot.account.display_name+"(" + toot.account.acct +")"+what+"\n\n"+$.strip_tags(toot.status.content),toot.account.avatar]);
|
||||
}
|
||||
}
|
||||
$(".notf-icon_" + acct_id).addClass("red-text");
|
||||
localStorage.setItem("notice-mem", noticetext);
|
||||
noticetext = "";
|
||||
|
Reference in New Issue
Block a user