sound
This commit is contained in:
@@ -296,7 +296,9 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) {
|
||||
")<br>";
|
||||
var boostback = "shared";
|
||||
var uniqueid=toot.id;
|
||||
var toot = toot.renote;
|
||||
if(!toot.text){
|
||||
var toot = toot.renote;
|
||||
}
|
||||
var dis_name=escapeHTMLtemp(toot.user.name);
|
||||
var uniqueid=toot.id;
|
||||
var actemojick=false
|
||||
@@ -636,9 +638,11 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) {
|
||||
});
|
||||
poll='<div class="vote_'+toot.id+'">'+poll+'</div>';
|
||||
}
|
||||
/*
|
||||
|
||||
*/
|
||||
//引用Renote
|
||||
if(toot.renote){
|
||||
poll=poll+'<div class="quote-renote"><div class="renote-icon"><a onclick="udg(\'' + toot.renote.user.id +
|
||||
'\',' + acct_id + ');" user="' + toot.renote.user.username + '" class="udg"><img src="'+toot.renote.user.avatarUrl+'"></a></div><div class="renote-user">'+escapeHTML(toot.renote.user.name)+'</div><div class="renote-text">'+escapeHTML(toot.renote.text)+'</div></div>'
|
||||
}
|
||||
if(localStorage.getItem("emojiReaction_" + acct_id)=="disabled"){
|
||||
var freeReact="hide";
|
||||
}else{
|
||||
@@ -667,7 +671,7 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) {
|
||||
var emoji = obj[i];
|
||||
if (":"+emoji.shortcode+":"==keye) {
|
||||
if (emoji) {
|
||||
addReact=addReact+ '<span class="reaction "><a onclick="reaction(\''+keye+'\',\'' + toot.id + '\',' + acct_id +
|
||||
addReact=addReact+ '<span class="reaction"><a onclick="reaction(\''+keye+'\',\'' + toot.id + '\',' + acct_id +
|
||||
',\'' + tlid +'\')" class="waves-effect waves-dark btn-flat pointer" style="padding:0;margin-left:3px;"><img src="'+emoji.url+'" style="width:13px;"></a><span class="re-'+emoji.shortcode+'ct">'+thisReact+
|
||||
'</span></span>';
|
||||
}
|
||||
|
@@ -251,16 +251,19 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
|
||||
$(".notf-reply_" + acct_id).text(replyct*1-(-1));
|
||||
localStorage.setItem("notf-reply_" + acct_id,replyct*1-(-1))
|
||||
$(".notf-reply_" + acct_id).removeClass("hide")
|
||||
var sound=localStorage.getItem("replySound");
|
||||
}else if (toot.type == "reblog") {
|
||||
var btct=localStorage.getItem("notf-bt_" + acct_id)
|
||||
$(".notf-bt_" + acct_id).text(btct*1-(-1));
|
||||
localStorage.setItem("notf-bt_" + acct_id,btct*1-(-1))
|
||||
$(".notf-bt_" + acct_id).removeClass("hide")
|
||||
var sound=localStorage.getItem("btSound");
|
||||
}else if (toot.type == "favourite") {
|
||||
var favct=localStorage.getItem("notf-fav_" + acct_id)
|
||||
$(".notf-fav_" + acct_id).text(favct*1-(-1));
|
||||
localStorage.setItem("notf-fav_" + acct_id,favct*1-(-1))
|
||||
$(".notf-fav_" + acct_id).removeClass("hide")
|
||||
var sound=localStorage.getItem("favSound");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -268,6 +271,25 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
|
||||
if(popup>0){
|
||||
Materialize.toast("["+domain+"]"+escapeHTML(toot.account.display_name)+what, popup * 1000);
|
||||
}
|
||||
//通知音
|
||||
if(sound=="default" || !sound){
|
||||
var file="../../source/notif.wav"
|
||||
}else if(sound=="c1"){
|
||||
var file=localStorage.getItem("custom1");
|
||||
}else if(sound=="c2"){
|
||||
var file=localStorage.getItem("custom2");
|
||||
}else if(sound=="c3"){
|
||||
var file=localStorage.getItem("custom3");
|
||||
}else if(sound=="c4"){
|
||||
var file=localStorage.getItem("custom4");
|
||||
}
|
||||
if(file){
|
||||
request = new XMLHttpRequest();
|
||||
request.open("GET", file, true);
|
||||
request.responseType = "arraybuffer";
|
||||
request.onload = playSound;
|
||||
request.send();
|
||||
}
|
||||
if(native=="yes"){
|
||||
var electron = require("electron");
|
||||
var ipc = electron.ipcRenderer;
|
||||
@@ -738,6 +760,10 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
|
||||
'"><i class="far fa-calendar-times"></i>' +
|
||||
ended+ '</span></div>';
|
||||
}
|
||||
//Quote
|
||||
if(toot.quote){
|
||||
poll=poll+'<div class="quote-renote"><div class="renote-icon"><img src="'+toot.quote.account.avatar+'"></div><div class="renote-user">'+escapeHTML(toot.quote.account.display_name)+'</div><div class="renote-text">'+toot.quote.content+'</div></div>'
|
||||
}
|
||||
templete = templete + '<div id="pub_' + toot.id + '" class="cvo ' +
|
||||
boostback + ' ' + fav_app + ' ' + rt_app + ' ' + pin_app +
|
||||
' ' + hasmedia + ' '+animecss+'" toot-id="' + id + '" unique-id="' + uniqueid + '" data-medias="'+media_ids+' " unixtime="' + date(obj[
|
||||
|
Reference in New Issue
Block a user