This commit is contained in:
cutls 2020-05-03 22:32:41 +09:00
parent d44cecf21f
commit 4dbc673719

View File

@ -2,7 +2,7 @@
function verck(ver, jp) { function verck(ver, jp) {
console.log('%c Welcome😊 ' + ver, 'color: red;font-size:200%;') console.log('%c Welcome😊 ' + ver, 'color: red;font-size:200%;')
var date = new Date() var date = new Date()
var show = false var showVer = false
if (localStorage.getItem('ver') != ver && localStorage.getItem('winstore')) { if (localStorage.getItem('ver') != ver && localStorage.getItem('winstore')) {
//ちょっと削除とリンク解析の都合上アレ(s) //ちょっと削除とリンク解析の都合上アレ(s)
//対象外のアプデ:storageが20の最初まで"Usamin (18.6.5)" //対象外のアプデ:storageが20の最初まで"Usamin (18.6.5)"
@ -15,7 +15,7 @@ function verck(ver, jp) {
} }
} }
//ちょっと削除とリンク解析の都合上アレ(e) //ちょっと削除とリンク解析の都合上アレ(e)
show = true showVer = true
console.log('%c Thank you for your update🎉', 'color: red;font-size:200%;') console.log('%c Thank you for your update🎉', 'color: red;font-size:200%;')
$(document).ready(function() { $(document).ready(function() {
if (localStorage.getItem('winstore')) { if (localStorage.getItem('winstore')) {
@ -37,8 +37,8 @@ function verck(ver, jp) {
}) })
} }
localStorage.setItem('ver', ver) localStorage.setItem('ver', ver)
if (!show) { if (!showVer) {
console.log(show) console.log(showVer)
if ( if (
date.getFullYear() * 100 + date.getMonth() + 1 >= localStorage.getItem('showSupportMe') || date.getFullYear() * 100 + date.getMonth() + 1 >= localStorage.getItem('showSupportMe') ||
!localStorage.getItem('showSupportMe') !localStorage.getItem('showSupportMe')
@ -172,7 +172,7 @@ function verck(ver, jp) {
} else { } else {
if (obj.type == 'textv2') { if (obj.type == 'textv2') {
if (~obj.languages.indexOf(lang.language)) { if (~obj.languages.indexOf(lang.language)) {
var show = true var showVer = true
if (obj.toot != '') { if (obj.toot != '') {
var toot = var toot =
'<button class="btn-flat toast-action" onclick="detEx(\'' + '<button class="btn-flat toast-action" onclick="detEx(\'' +
@ -183,25 +183,25 @@ function verck(ver, jp) {
} }
if (obj.ver != '') { if (obj.ver != '') {
if (obj.ver == ver) { if (obj.ver == ver) {
show = true showVer = true
} else { } else {
show = false showVer = false
} }
} }
if (obj.domain != '') { if (obj.domain != '') {
var multi = localStorage.getItem('multi') var multi = localStorage.getItem('multi')
if (multi) { if (multi) {
show = false showVer = false
var accts = JSON.parse(multi) var accts = JSON.parse(multi)
Object.keys(accts).forEach(function(key) { Object.keys(accts).forEach(function(key) {
var acct = accts[key] var acct = accts[key]
if (acct.domain == obj.domain) { if (acct.domain == obj.domain) {
show = true showVer = true
} }
}) })
} }
} }
if (show) { if (showVer) {
M.toast({ M.toast({
html: html:
escapeHTML(obj.text) + escapeHTML(obj.text) +
@ -231,7 +231,7 @@ function infowebsocket() {
if (obj.type == 'textv2') { if (obj.type == 'textv2') {
if (~obj.languages.indexOf(lang.language)) { if (~obj.languages.indexOf(lang.language)) {
localStorage.setItem('last-notice-id', obj.id) localStorage.setItem('last-notice-id', obj.id)
var show = true var showVer = true
if (obj.toot != '') { if (obj.toot != '') {
var toot = var toot =
'<button class="btn-flat toast-action" onclick="detEx(\'' + '<button class="btn-flat toast-action" onclick="detEx(\'' +
@ -242,25 +242,25 @@ function infowebsocket() {
} }
if (obj.ver != '') { if (obj.ver != '') {
if (obj.ver == ver) { if (obj.ver == ver) {
show = true showVer = true
} else { } else {
show = false showVer = false
} }
} }
if (obj.domain != '') { if (obj.domain != '') {
var multi = localStorage.getItem('multi') var multi = localStorage.getItem('multi')
if (multi) { if (multi) {
show = false showVer = false
var accts = JSON.parse(multi) var accts = JSON.parse(multi)
Object.keys(accts).forEach(function(key) { Object.keys(accts).forEach(function(key) {
var acct = accts[key] var acct = accts[key]
if (acct.domain == obj.domain) { if (acct.domain == obj.domain) {
show = true showVer = true
} }
}) })
} }
} }
if (show) { if (showVer) {
console.log(obj.text) console.log(obj.text)
console.log(escapeHTML(obj.text)) console.log(escapeHTML(obj.text))
M.toast({ M.toast({
@ -351,7 +351,7 @@ function storeDialog(platform, ver) {
localStorage.setItem('winstore', 'localinstall') localStorage.setItem('winstore', 'localinstall')
} }
localStorage.setItem('ver', ver) localStorage.setItem('ver', ver)
show = true showVer = true
console.log('%c Thank you for your update🎉', 'color: red;font-size:200%;') console.log('%c Thank you for your update🎉', 'color: red;font-size:200%;')
$(document).ready(function() { $(document).ready(function() {
$('#releasenote').modal('open') $('#releasenote').modal('open')
@ -372,7 +372,7 @@ function storeDialog(platform, ver) {
}) })
} else { } else {
localStorage.setItem('ver', ver) localStorage.setItem('ver', ver)
show = true showVer = true
console.log('%c Thank you for your update🎉', 'color: red;font-size:200%;') console.log('%c Thank you for your update🎉', 'color: red;font-size:200%;')
$(document).ready(function() { $(document).ready(function() {
$('#releasenote').modal('open') $('#releasenote').modal('open')