This commit is contained in:
cutls 2020-07-09 17:03:22 +09:00
parent 414782fd71
commit 0bf3f69a28
20 changed files with 61 additions and 55 deletions

View File

@ -12,7 +12,10 @@ html {
font-size: 13px;
}
.waves-effect:hover {
filter: brightness(120%);
filter: brightness(80%);
}
.waves-effect:focus {
filter: brightness(70%);
}
.titlebar,
.menubar-menu-container,

View File

@ -204,7 +204,7 @@ function verck(ver, jp) {
}
}
if (showVer) {
M.toast({
Mtoast({
html:
escapeHTML(obj.text) +
toot +
@ -265,7 +265,7 @@ function infowebsocket() {
if (showVer) {
console.log(obj.text)
console.log(escapeHTML(obj.text))
M.toast({
Mtoast({
html:
escapeHTML(obj.text) +
toot +

View File

@ -197,7 +197,7 @@ function getdata() {
.then(function(json) {
if (json.error) {
console.error('Error:' + json.error)
M.toast({ html: lang.lang_fatalerroroccured + 'Error:' + json.error, displayLength: 5000 })
Mtoast({ html: lang.lang_fatalerroroccured + 'Error:' + json.error, displayLength: 5000 })
return
}
var avatar = json['avatar']
@ -255,7 +255,7 @@ function getdataAdv(domain, at) {
.then(function(json) {
if (json.error) {
console.error('Error:' + json.error)
M.toast({ html: lang.lang_fatalerroroccured + 'Error:' + json.error, displayLength: 5000 })
Mtoast({ html: lang.lang_fatalerroroccured + 'Error:' + json.error, displayLength: 5000 })
return
}
var avatar = json['avatar']
@ -321,7 +321,7 @@ function refresh(target, loadskip) {
.then(function(json) {
if (json.error) {
console.error('Error:' + json.error)
M.toast({ html: lang.lang_fatalerroroccured + 'Error:' + json.error, displayLength: 5000 })
Mtoast({ html: lang.lang_fatalerroroccured + 'Error:' + json.error, displayLength: 5000 })
return
}
var avatar = json['avatar']

View File

@ -640,7 +640,7 @@ function code(code) {
$('#code').val('')
}
if (!code || code == '') {
M.toast({ html: lang.lang_fatalerroroccured + 'Error: no code', displayLength: 5000 })
Mtoast({ html: lang.lang_fatalerroroccured + 'Error: no code', displayLength: 5000 })
return false
}
var url = localStorage.getItem('domain_tmp')
@ -757,7 +757,7 @@ function getdata(domain, at) {
.then(function(json) {
if (json.error) {
console.error('Error:' + json.error)
M.toast({ html: lang.lang_fatalerroroccured + 'Error:' + json.error, displayLength: 5000 })
Mtoast({ html: lang.lang_fatalerroroccured + 'Error:' + json.error, displayLength: 5000 })
return
}
var avatar = json['avatar']
@ -830,7 +830,7 @@ function atSetup(type) {
}
}
if (!i || i == '') {
M.toast({ html: lang.lang_fatalerroroccured + 'Error: access token', displayLength: 5000 })
Mtoast({ html: lang.lang_fatalerroroccured + 'Error: access token', displayLength: 5000 })
return false
}
var obj = JSON.parse(multi)
@ -883,7 +883,7 @@ function refresh(target) {
.then(function(json) {
if (json.error) {
console.error('Error:' + json.error)
M.toast({ html: lang.lang_fatalerroroccured + 'Error:' + json.error, displayLength: 5000 })
Mtoast({ html: lang.lang_fatalerroroccured + 'Error:' + json.error, displayLength: 5000 })
return
}
var avatar = json['avatar']
@ -1012,7 +1012,7 @@ function multisel() {
function mainacct() {
var acct_id = $('#main-acct-sel').val()
localStorage.setItem('main', acct_id)
M.toast({ html: lang.lang_manager_mainAcct, displayLength: 3000 })
Mtoast({ html: lang.lang_manager_mainAcct, displayLength: 3000 })
}
function colorpicker(key) {
temp = `<div onclick="coloradd('${key}','def','def')" class="pointer exc">${lang.lang_manager_none}</div>

View File

@ -153,7 +153,7 @@ onmessage = function(e) {
var showTxt = `${lang.lang_img_DLDone}${
e.data[1][0]
}<button class="btn-flat toast-action" onclick="openFinder('${e.data[1][1]}')">Show</button>`
M.toast({ html: showTxt, displayLength: 5000 })
Mtoast({ html: showTxt, displayLength: 5000 })
} else if (e.data[0] == 'parseColumn') {
parseColumn(e.data[1])
} else if (e.data[0] == 'exportSettingsCore') {

View File

@ -225,6 +225,9 @@ function evalAttr(json, attr, lenCk) {
return false
}
}
function Mtoast(obj) {
return true
}
function statusModel(now) {
if (!now) {
var now = new Date().toString()

View File

@ -45,7 +45,7 @@ function mdCheck() {
$('#trendtag').html('')
}
if (localStorage.getItem('mode_' + domain) == 'misskey') {
M.toast({ html: lang.lang_bbmd_misskey, displayLength: 5000 })
Mtoast({ html: lang.lang_bbmd_misskey, displayLength: 5000 })
}
if (idata[domain + '_letters']) {
$('#textarea').attr('data-length', idata[domain + '_letters'])

View File

@ -156,7 +156,7 @@ async function media(b64, type, no, stamped) {
$('.toot-btn-group').prop('disabled', false)
//$('select').formSelect()
$('#mec').text(lang.lang_there)
M.toast({ html: '<span>' + lang.lang_postimg_sync + '</span><button class="btn-flat toast-action" onclick="syncDetail()">Click</button>', displayLength: 3000 })
Mtoast({ html: '<span>' + lang.lang_postimg_sync + '</span><button class="btn-flat toast-action" onclick="syncDetail()">Click</button>', displayLength: 3000 })
$('#imgup').text('')
$('#imgsel').show()
localStorage.removeItem('image')
@ -178,7 +178,7 @@ async function media(b64, type, no, stamped) {
$('.toot-btn-group').prop('disabled', false)
//$('select').formSelect()
$('#mec').text(lang.lang_there)
M.toast({ html: this.status + ':' +json, displayLength: 2000 })
Mtoast({ html: this.status + ':' +json, displayLength: 2000 })
$('#imgup').text('')
$('#imgsel').show()
}
@ -189,7 +189,7 @@ async function media(b64, type, no, stamped) {
$('#post-acct-sel').prop('disabled', false)
//$('select').formSelect()
$('#imgsel').show()
M.toast({ html: lang.lang_postimg_failupload, displayLength: 5000 })
Mtoast({ html: lang.lang_postimg_failupload, displayLength: 5000 })
return false
}
$('#imgup').text('')

View File

@ -49,7 +49,7 @@ function fav(id, acct_id, remote) {
$('.fav_' + id).addClass('yellow-text')
}
} else {
M.toast({ html: lang.lang_status_favWarn, displayLength: 1000 })
Mtoast({ html: lang.lang_status_favWarn, displayLength: 1000 })
}
}
}
@ -240,7 +240,7 @@ async function acctResolve(acct_id, user) {
if (idJson.accounts[0]) {
var id = idJson.accounts[0].id
} else {
M.toast({ html: lang.lang_fatalerroroccured, displayLength: 2000 })
Mtoast({ html: lang.lang_fatalerroroccured, displayLength: 2000 })
}
return id
}
@ -580,7 +580,7 @@ function empUser() {
if (!obj) {
var obj = []
obj.push(id)
M.toast({ html: id + lang.lang_status_emphas, displayLength: 4000 })
Mtoast({ html: id + lang.lang_status_emphas, displayLength: 4000 })
} else {
var can
Object.keys(obj).forEach(function(key) {
@ -590,7 +590,7 @@ function empUser() {
} else {
can = true
obj.splice(key, 1)
M.toast({ html: id + lang.lang_status_unemphas, displayLength: 4000 })
Mtoast({ html: id + lang.lang_status_unemphas, displayLength: 4000 })
}
})
}
@ -634,7 +634,7 @@ function pinUser() {
//URLコピー
function tootUriCopy(url) {
execCopy(url)
M.toast({ html: lang.lang_details_url, displayLength: 1500 })
Mtoast({ html: lang.lang_details_url, displayLength: 1500 })
}
//他のアカウントで…

View File

@ -555,10 +555,10 @@ function cbCopy(mode) {
`<iframe src="${url}/embed" class="mastodon-embed" style="max-width: 100%; border: 0" width="400"></iframe>
<script src="https://${domain}/embed.js" async="async"></script>`
execCopy(emb)
M.toast({ html: lang.lang_details_embed, displayLength: 1500 })
Mtoast({ html: lang.lang_details_embed, displayLength: 1500 })
} else {
if (execCopy(url)) {
M.toast({ html: lang.lang_details_url, displayLength: 1500 })
Mtoast({ html: lang.lang_details_url, displayLength: 1500 })
}
}
}
@ -573,7 +573,7 @@ function staCopy(id) {
html = html.replace(/<img[\s\S]*alt="(.+?)"[\s\S]*?>/g, '$1')
html = $.strip_tags(html)
if (execCopy(html)) {
M.toast({ html: lang.lang_details_txt, displayLength: 1500 })
Mtoast({ html: lang.lang_details_txt, displayLength: 1500 })
}
}
//翻訳

View File

@ -260,7 +260,7 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) {
}
var domain = localStorage.getItem("domain_" + acct_id);
if (popup > 0) {
M.toast({ html: "[" + domain + "]" + escapeHTMLtemp(toot.user.name) + what, displayLength: popup * 1000 })
Mtoast({ html: "[" + domain + "]" + escapeHTMLtemp(toot.user.name) + what, displayLength: popup * 1000 })
}
if (native == "yes") {
var os = localStorage.getItem("platform");
@ -888,7 +888,7 @@ function misskeyUserparse(obj, auth, acct_id, tlid, popup) {
}
var memory = localStorage.getItem("notice-mem");
if (popup >= 0 && obj.length < 5 && notftext != memory) {
M.toast({ html: escapeHTMLtemp(toot.name) + ":" + ftxt, displayLength: popup * 1000 })
Mtoast({ html: escapeHTMLtemp(toot.name) + ":" + ftxt, displayLength: popup * 1000 })
$(".notf-icon_" + tlid).addClass("red-text");
localStorage.setItem("notice-mem", notftext);
notftext = "";

View File

@ -315,7 +315,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
}
}
if (popup > 0) {
M.toast({
Mtoast({
html: '[' + domain + ']' + escapeHTML(toot.account.display_name) + what,
displayLength: popup * 1000
})
@ -1226,7 +1226,7 @@ function userparse(obj, auth, acct_id, tlid, popup) {
}
var memory = localStorage.getItem('notice-mem')
if (popup >= 0 && obj.length < 5 && notftext != memory) {
M.toast({ html: escapeHTML(toot.display_name) + ':' + ftxt, displayLength: popup * 1000 })
Mtoast({ html: escapeHTML(toot.display_name) + ':' + ftxt, displayLength: popup * 1000 })
$('.notf-icon_' + tlid).addClass('red-text')
localStorage.setItem('notice-mem', notftext)
notftext = ''
@ -1366,7 +1366,7 @@ function client(name) {
if (!obj) {
var obj = []
obj.push(name)
M.toast({ html: escapeHTML(name) + lang.lang_status_emphas, displayLength: 2000 })
Mtoast({ html: escapeHTML(name) + lang.lang_status_emphas, displayLength: 2000 })
} else {
var can
Object.keys(obj).forEach(function(key) {
@ -1376,12 +1376,12 @@ function client(name) {
} else {
can = true
obj.splice(key, 1)
M.toast({ html: escapeHTML(name) + lang.lang_status_unemphas, displayLength: 2000 })
Mtoast({ html: escapeHTML(name) + lang.lang_status_unemphas, displayLength: 2000 })
}
})
if (!can) {
obj.push(name)
M.toast({ html: escapeHTML(name) + lang.lang_status_emphas, displayLength: 2000 })
Mtoast({ html: escapeHTML(name) + lang.lang_status_emphas, displayLength: 2000 })
} else {
}
var json = JSON.stringify(obj)
@ -1398,7 +1398,7 @@ function client(name) {
obj.push(name)
var json = JSON.stringify(obj)
localStorage.setItem('client_mute', json)
M.toast({ html: escapeHTML(name) + lang.lang_parse_mute, displayLength: 2000 })
Mtoast({ html: escapeHTML(name) + lang.lang_parse_mute, displayLength: 2000 })
parseColumn()
}
})

View File

@ -143,14 +143,14 @@ function voiceSettings() {
var awk = $('[name=bym]:checked').val()
if (awk == 'yes') {
localStorage.setItem('voice_bouyomi', 'yes')
M.toast({ html: 'Bouyomi Chan connection requires WebSocket Plugin', displayLength: 3000 })
Mtoast({ html: 'Bouyomi Chan connection requires WebSocket Plugin', displayLength: 3000 })
} else {
localStorage.removeItem('voice_bouyomi')
}
localStorage.setItem('voice_speed', $('#voicespeed').val() / 10)
localStorage.setItem('voice_pitch', $('#voicepitch').val() / 50)
localStorage.setItem('voice_vol', $('#voicevol').val() / 100)
M.toast({ html: lang.lang_speech_refresh, displayLength: 3000 })
Mtoast({ html: lang.lang_speech_refresh, displayLength: 3000 })
}
function voiceSettingLoad() {
var flag = localStorage.getItem('voice_bouyomi')

View File

@ -156,10 +156,10 @@ function autoToot(tag) {
var nowPT = localStorage.getItem('stable')
if (nowPT == tag) {
localStorage.removeItem('stable')
M.toast({ html: lang.lang_tags_unrealtime, displayLength: 3000 })
Mtoast({ html: lang.lang_tags_unrealtime, displayLength: 3000 })
} else {
localStorage.setItem('stable', tag)
M.toast({
Mtoast({
html: lang.lang_tags_tagwarn.replace('{{tag}}', tag).replace('{{tag}}', tag),
displayLength: 3000
})
@ -195,7 +195,7 @@ function tagFeature(name, acct_id) {
})
.then(function(json) {
console.log(json)
M.toast({ html: 'Complete: ' + escapeHTML(name), displayLength: 3000 })
Mtoast({ html: 'Complete: ' + escapeHTML(name), displayLength: 3000 })
})
}
//タグのフィルタ

View File

@ -1000,7 +1000,7 @@ function reconnector(tlid, type, acct_id, data, mode) {
var mute = getFilterTypeByAcct(acct_id, type)
reload(type, '', acct_id, tlid, data, mute, '', voice, mode)
}
M.toast({ html: lang.lang_tl_reconnect, displayLength: 2000 })
Mtoast({ html: lang.lang_tl_reconnect, displayLength: 2000 })
}
function columnReload(tlid, type) {
$('#notice_icon_' + tlid).addClass('red-text')

View File

@ -291,5 +291,5 @@ function stopVideo() {
function copyImgUrl() {
var murl = $('#imagemodal').attr('data-original')
execCopy(murl)
M.toast({ html: lang.lang_img_copyDone, displayLength: 1500 })
Mtoast({ html: lang.lang_img_copyDone, displayLength: 1500 })
}

View File

@ -5,7 +5,7 @@ var envView = new Vue({
methods: {
complete: function (i, val) {
var ls = envView.config[i].storage
M.toast({ html: 'Complete', displayLength: 3000 })
Mtoast({ html: 'Complete', displayLength: 3000 })
if (!val) {
var id = envView.config[i].id
var val = $('#' + id).val()
@ -39,7 +39,7 @@ var tlView = new Vue({
ls = ls.data
}
for (var j = 0; j < ls.length; j++) {
M.toast({ html: 'Complete', displayLength: 3000 })
Mtoast({ html: 'Complete', displayLength: 3000 })
var id = ls[j].id
var val = $('#' + id).val()
localStorage.setItem(ls[j].storage, val)
@ -68,7 +68,7 @@ var postView = new Vue({
ls = ls.data
}
for (var j = 0; j < ls.length; j++) {
M.toast({ html: 'Complete', displayLength: 3000 })
Mtoast({ html: 'Complete', displayLength: 3000 })
var id = ls[j].id
var val = $('#' + id).val()
localStorage.setItem(ls[j].storage, val)
@ -90,7 +90,7 @@ function settings() {
$('#' + theme).prop('checked', true)
} else {
if (cd != localStorage.getItem('theme')) {
M.toast({ html: lang.lang_setting_theme.replace('{{set}}', ct), displayLength: 3000 })
Mtoast({ html: lang.lang_setting_theme.replace('{{set}}', ct), displayLength: 3000 })
}
//テーマはこの場で設定
themes(cd)
@ -99,14 +99,14 @@ function settings() {
var fontd = $('#font').val()
if (fontd) {
if (fontd != localStorage.getItem('font')) {
M.toast({ html: lang.lang_setting_font.replace('{{set}}', fontd), displayLength: 3000 })
Mtoast({ html: lang.lang_setting_font.replace('{{set}}', fontd), displayLength: 3000 })
}
localStorage.setItem('font', fontd)
themes()
} else {
if (localStorage.getItem('font')) {
localStorage.removeItem('font')
M.toast({ html: lang.lang_setting_font.replace('{{set}}', '"default"'), displayLength: 3000 })
Mtoast({ html: lang.lang_setting_font.replace('{{set}}', '"default"'), displayLength: 3000 })
themes()
}
}
@ -286,7 +286,7 @@ function notftest() {
function oks(no) {
var txt = $('#oks-' + no).val()
localStorage.setItem('oks-' + no, txt)
M.toast({ html: lang.lang_setting_ksref, displayLength: 3000 })
Mtoast({ html: lang.lang_setting_ksref, displayLength: 3000 })
}
function oksload() {
if (localStorage.getItem('oks-1')) {
@ -830,5 +830,5 @@ function lastFmSet() {
} else {
localStorage.removeItem('lastFmUser')
}
M.toast({ html: 'Complete: last.fm', displayLength: 3000 })
Mtoast({ html: 'Complete: last.fm', displayLength: 3000 })
}

View File

@ -104,7 +104,7 @@ function sort() {
var json = JSON.stringify(newobj);
localStorage.setItem("column", json);
$("#sort").html("");
M.toast({ html: "Sorted", displayLength: 3000 })
Mtoast({ html: "Sorted", displayLength: 3000 })
sortLoad();
parseColumn();
sortMenu()

View File

@ -53,20 +53,20 @@ function spotifyFlagSave() {
var awk = $('[name=awk]:checked').val()
if (awk == 'yes') {
localStorage.setItem('artwork', 'yes')
M.toast({ html: lang.lang_spotify_img, displayLength: 3000 })
Mtoast({ html: lang.lang_spotify_img, displayLength: 3000 })
} else {
localStorage.removeItem('artwork')
M.toast({ html: lang.lang_spotify_imgno, displayLength: 3000 })
Mtoast({ html: lang.lang_spotify_imgno, displayLength: 3000 })
}
}
function aMusicFlagSave() {
var awk = $('[name=amw]:checked').val()
if (awk == 'yes') {
localStorage.setItem('complete-artwork', 'yes')
M.toast({ html: lang.lang_spotify_img, displayLength: 3000 })
Mtoast({ html: lang.lang_spotify_img, displayLength: 3000 })
} else {
localStorage.removeItem('complete-artwork')
M.toast({ html: lang.lang_spotify_imgno, displayLength: 3000 })
Mtoast({ html: lang.lang_spotify_imgno, displayLength: 3000 })
}
}
function nowplaying(mode) {
@ -267,7 +267,7 @@ async function npCore(arg) {
function spotifySave() {
var temp = $('#np-temp').val()
localStorage.setItem('np-temp', temp)
M.toast({ html: lang.lang_spotify_np, displayLength: 3000 })
Mtoast({ html: lang.lang_spotify_np, displayLength: 3000 })
}
if (location.search) {
var m = location.search.match(/\?mode=([a-zA-Z-0-9]+)\&code=(.+)/)

View File

@ -99,7 +99,7 @@ function udg(user, acct_id) {
}
//moved設定時
if (json.moved) {
M.toast({
Mtoast({
html: lang.lang_showontl_movetxt + '<button class="btn-flat toast-action" onclick="udg(\'' + json.moved.id + "','" + acct_id + "')\">" + lang.lang_showontl_movebtn + "</button>",
displayLength: 4000
});
@ -483,7 +483,7 @@ function setMain() {
var acct_id = $("#his-data").attr("use-acct");
localStorage.setItem("main", acct_id);
multiSelector(true);
M.toast({ html: lang.lang_manager_mainAcct, displayLength: 3000 });
Mtoast({ html: lang.lang_manager_mainAcct, displayLength: 3000 });
}
//オールリセット
function hisclose() {