diff --git a/html/src/app.js b/html/src/app.js index 43197454..674ce7aa 100644 --- a/html/src/app.js +++ b/html/src/app.js @@ -435,7 +435,7 @@ speechSynthesis.getVoices(); console.log(init, response.data); } return response; - } catch (e) { } + } catch (e) {} if (response.status === 200) { this.$throw(0, 'Invalid JSON response'); } @@ -655,12 +655,12 @@ speechSynthesis.getVoices(); if ( args.json.length > 0 && ((options.params.offset += args.json.length), - // eslint-disable-next-line no-nested-ternary - options.N > 0 - ? options.N > options.params.offset - : options.N < 0 - ? args.json.length - : options.params.n === args.json.length) + // eslint-disable-next-line no-nested-ternary + options.N > 0 + ? options.N > options.params.offset + : options.N < 0 + ? args.json.length + : options.params.n === args.json.length) ) { this.bulk(options); } else if ('done' in options) { @@ -1032,7 +1032,7 @@ speechSynthesis.getVoices(); (this.worlddialogshortname && this.locationobject.shortName && this.worlddialogshortname === - this.locationobject.shortName) || + this.locationobject.shortName) || this.currentuserid === this.locationobject.userId ) { this.isUnlocked = true; @@ -1114,7 +1114,7 @@ speechSynthesis.getVoices(); ); this.avatarName = avatarInfo.avatarName; this.ownerId = avatarInfo.ownerId; - } catch (err) { } + } catch (err) {} } if (typeof this.userid === 'undefined' || !this.ownerId) { this.color = ''; @@ -2902,7 +2902,7 @@ speechSynthesis.getVoices(); if (object === Object(object)) { details = object; } - } catch (err) { } + } catch (err) {} } ref.details = details; } @@ -4624,7 +4624,7 @@ speechSynthesis.getVoices(); } try { socket.close(); - } catch (err) { } + } catch (err) {} if ($app.debugWebSocket) { console.log('WebSocket closed'); } @@ -4644,7 +4644,7 @@ speechSynthesis.getVoices(); var json = JSON.parse(data); try { json.content = JSON.parse(json.content); - } catch (err) { } + } catch (err) {} this.$emit('PIPELINE', { json }); @@ -4677,7 +4677,7 @@ speechSynthesis.getVoices(); this.webSocket = null; try { socket.close(); - } catch (err) { } + } catch (err) {} }; // #endregion @@ -4698,8 +4698,6 @@ speechSynthesis.getVoices(); // #endregion // API - - // #endregion // #region | Misc @@ -5256,7 +5254,7 @@ speechSynthesis.getVoices(); if (i > 0) { if ( data[i - 1].created_at === - this.sharedFeed.gameLog.lastEntryDate && + this.sharedFeed.gameLog.lastEntryDate && forceUpdate === false ) { return; @@ -5287,9 +5285,9 @@ speechSynthesis.getVoices(); if ( feedItem.type === 'OnPlayerLeft' && Date.parse(feedItem.created_at) >= - currentUserLeaveTime && + currentUserLeaveTime && Date.parse(feedItem.created_at) <= - currentUserLeaveTime + 5 * 1000 + currentUserLeaveTime + 5 * 1000 ) { wristArr.splice(k, 1); w--; @@ -5305,7 +5303,7 @@ speechSynthesis.getVoices(); feedItem.type === 'OnPlayerJoined' && Date.parse(feedItem.created_at) >= locationJoinTime && Date.parse(feedItem.created_at) <= - locationJoinTime + 20 * 1000 + locationJoinTime + 20 * 1000 ) { wristArr.splice(k, 1); w--; @@ -5458,7 +5456,7 @@ speechSynthesis.getVoices(); if (i > 0) { if ( data[i - 1].created_at === - this.sharedFeed.feedTable.lastEntryDate && + this.sharedFeed.feedTable.lastEntryDate && forceUpdate === false ) { return; @@ -5538,7 +5536,7 @@ speechSynthesis.getVoices(); if (i > 0) { if ( data[i - 1].created_at === - this.sharedFeed.notificationTable.lastEntryDate && + this.sharedFeed.notificationTable.lastEntryDate && forceUpdate === false ) { return; @@ -5604,7 +5602,7 @@ speechSynthesis.getVoices(); if (i > 0) { if ( data[i - 1].created_at === - this.sharedFeed.friendLogTable.lastEntryDate && + this.sharedFeed.friendLogTable.lastEntryDate && forceUpdate === false ) { return; @@ -5673,7 +5671,7 @@ speechSynthesis.getVoices(); if (i > 0) { if ( data[i - 1].created_at === - this.sharedFeed.moderationAgainstTable.lastEntryDate && + this.sharedFeed.moderationAgainstTable.lastEntryDate && forceUpdate === false ) { return; @@ -5967,7 +5965,8 @@ speechSynthesis.getVoices(); break; case 'invite': this.speak( - `${noty.senderUsername + `${ + noty.senderUsername } has invited you to ${this.displayLocation( noty.details.worldId, noty.details.worldName @@ -6025,7 +6024,8 @@ speechSynthesis.getVoices(); case 'PortalSpawn': if (noty.displayName) { this.speak( - `${noty.displayName + `${ + noty.displayName } has spawned a portal to ${this.displayLocation( noty.instanceId, noty.worldName @@ -6148,7 +6148,8 @@ speechSynthesis.getVoices(); case 'invite': AppApi.XSNotification( 'VRCX', - `${noty.senderUsername + `${ + noty.senderUsername } has invited you to ${this.displayLocation( noty.details.worldId, noty.details.worldName @@ -6237,7 +6238,8 @@ speechSynthesis.getVoices(); if (noty.displayName) { AppApi.XSNotification( 'VRCX', - `${noty.displayName + `${ + noty.displayName } has spawned a portal to ${this.displayLocation( noty.instanceId, noty.worldName @@ -6759,7 +6761,7 @@ speechSynthesis.getVoices(); if (this.loginForm.lastUserLoggedIn) { var user = this.loginForm.savedCredentials[ - this.loginForm.lastUserLoggedIn + this.loginForm.lastUserLoggedIn ]; if (typeof user !== 'undefined') { webApiService.clearCookies(); @@ -7228,9 +7230,9 @@ speechSynthesis.getVoices(); .then(({ value }) => { let saveCredential = this.loginForm.savedCredentials[ - Object.keys( - this.loginForm.savedCredentials - )[0] + Object.keys( + this.loginForm.savedCredentials + )[0] ]; security .decrypt( @@ -7349,7 +7351,7 @@ speechSynthesis.getVoices(); $app.methods.getMemo = async function (userId) { try { return await database.getMemo(userId); - } catch (err) { } + } catch (err) {} return { userId: '', editedAt: '', @@ -7996,7 +7998,7 @@ speechSynthesis.getVoices(); }); worldName = args.ref.name; } - } catch (err) { } + } catch (err) {} } return worldName; }; @@ -8019,7 +8021,7 @@ speechSynthesis.getVoices(); groupId }); groupName = args.ref.name; - } catch (err) { } + } catch (err) {} return groupName; }; @@ -8834,7 +8836,7 @@ speechSynthesis.getVoices(); }; try { avatarInfo = await $app.getAvatarName(currentAvatarImageUrl); - } catch (err) { } + } catch (err) {} var feed = { created_at: new Date().toJSON(), type: 'Avatar', @@ -9414,7 +9416,7 @@ speechSynthesis.getVoices(); if ( ref.location !== this.lastLocation.location && ref.travelingToLocation !== - this.lastLocation.location + this.lastLocation.location ) { // fix $location_at with private ref.$location_at = joinTime; @@ -10550,8 +10552,9 @@ speechSynthesis.getVoices(); } if (this.debugPhotonLogging) { var displayName = this.getDisplayNameFromPhotonId(senderId); - var feed = `RPC ${displayName} ${this.photonEventType[eventData.EventType] - }${eventName}`; + var feed = `RPC ${displayName} ${ + this.photonEventType[eventData.EventType] + }${eventName}`; console.log('VrcRpc:', feed); } } @@ -11580,8 +11583,8 @@ speechSynthesis.getVoices(); $app.methods.formatSeconds = function (duration) { var pad = function (num, size) { - return `000${num}`.slice(size * -1); - }, + return `000${num}`.slice(size * -1); + }, time = parseFloat(duration).toFixed(3), hours = Math.floor(time / 60 / 60), minutes = Math.floor(time / 60) % 60, @@ -11798,7 +11801,7 @@ speechSynthesis.getVoices(); (this.nowPlaying.startTime - this.nowPlaying.offset + this.nowPlaying.length) * - 1000 + 1000 ); } } else if (!this.discordHideImage && L.thumbnailImageUrl) { @@ -12611,7 +12614,7 @@ speechSynthesis.getVoices(); API.getUser({ userId: id }); - } catch { } + } catch {} return; } API.getFriendStatus({ @@ -15764,8 +15767,9 @@ speechSynthesis.getVoices(); if (type === 'search') { try { var response = await webApiService.execute({ - url: `${this.avatarRemoteDatabaseProvider - }?${type}=${encodeURIComponent(search)}&n=5000`, + url: `${ + this.avatarRemoteDatabaseProvider + }?${type}=${encodeURIComponent(search)}&n=5000`, method: 'GET', headers: { Referer: 'https://vrcx.pypy.moe' @@ -18088,7 +18092,8 @@ speechSynthesis.getVoices(); args.push(`vrchat://launch?id=${location}`); } } - var { launchArguments, vrcLaunchPathOverride } = this.launchOptionsDialog; + var { launchArguments, vrcLaunchPathOverride } = + this.launchOptionsDialog; if (launchArguments) { args.push(launchArguments); } @@ -21299,7 +21304,7 @@ speechSynthesis.getVoices(); try { var args = await API.getFavoriteWorlds(params); worldLists.push([list.displayName, list.visibility, args.json]); - } catch (err) { } + } catch (err) {} } this.userFavoriteWorlds = worldLists; this.userDialog.isFavoriteWorldsLoading = false; @@ -21726,7 +21731,7 @@ speechSynthesis.getVoices(); if ( (asset.content_type === 'application/x-msdownload' || asset.content_type === - 'application/x-msdos-program') && + 'application/x-msdos-program') && asset.state === 'uploaded' ) { var downloadUrl = asset.browser_download_url; @@ -21857,7 +21862,7 @@ speechSynthesis.getVoices(); if ( (asset.content_type === 'application/x-msdownload' || asset.content_type === - 'application/x-msdos-program') && + 'application/x-msdos-program') && asset.state === 'uploaded' ) { var downloadUrl = asset.browser_download_url; @@ -25775,4 +25780,4 @@ speechSynthesis.getVoices(); $app = new Vue($app); window.$app = $app; })(); -// #endregion \ No newline at end of file +// #endregion diff --git a/html/src/localization/localizedStrings.js b/html/src/localization/localizedStrings.js index ac6b687f..d7386981 100644 --- a/html/src/localization/localizedStrings.js +++ b/html/src/localization/localizedStrings.js @@ -1,23 +1,23 @@ -import en from './strings/en.json' assert {type: 'JSON'}; +import en from './strings/en.json' assert { type: 'JSON' }; import elements_en from 'element-ui/lib/locale/lang/en'; -import ja from './strings/ja.json' assert {type: 'JSON'}; +import ja from './strings/ja.json' assert { type: 'JSON' }; import elements_ja from 'element-ui/lib/locale/lang/ja'; -import zh_TW from './strings/zh_TW.json' assert {type: 'JSON'}; +import zh_TW from './strings/zh_TW.json' assert { type: 'JSON' }; import elements_zh_TW from 'element-ui/lib/locale/lang/zh-TW'; -import ko from './strings/ko.json' assert {type: 'JSON'}; +import ko from './strings/ko.json' assert { type: 'JSON' }; import elements_ko from 'element-ui/lib/locale/lang/ko'; -import zh_CN from './strings/zh_CN.json' assert {type: 'JSON'}; +import zh_CN from './strings/zh_CN.json' assert { type: 'JSON' }; import elements_zh_CN from 'element-ui/lib/locale/lang/zh-CN'; -const localized_en = {...en, ...elements_en}; -const localized_zh_TW = {...zh_TW, ...elements_zh_TW}; -const localized_zh_CN = {...zh_CN, ...elements_zh_CN}; -const localized_ko = {...ko, ...elements_ko}; -const localized_ja = {...ja, ...elements_ja}; +const localized_en = { ...en, ...elements_en }; +const localized_zh_TW = { ...zh_TW, ...elements_zh_TW }; +const localized_zh_CN = { ...zh_CN, ...elements_zh_CN }; +const localized_ko = { ...ko, ...elements_ko }; +const localized_ja = { ...ja, ...elements_ja }; export { localized_en as en, diff --git a/html/src/repository/config.js b/html/src/repository/config.js index c3fcf00a..21c71aa8 100644 --- a/html/src/repository/config.js +++ b/html/src/repository/config.js @@ -1,5 +1,5 @@ import sqliteService from '../service/sqlite.js'; -import sharedRepository, {SharedRepository} from './shared.js'; +import sharedRepository, { SharedRepository } from './shared.js'; var dirtyKeySet = new Set(); @@ -76,4 +76,4 @@ class ConfigRepository extends SharedRepository { var self = new ConfigRepository(); window.configRepository = self; -export {self as default, ConfigRepository}; +export { self as default, ConfigRepository }; diff --git a/html/src/repository/database.js b/html/src/repository/database.js index 2493a25d..029d212b 100644 --- a/html/src/repository/database.js +++ b/html/src/repository/database.js @@ -1986,4 +1986,4 @@ class Database { var self = new Database(); window.database = self; -export {self as default, Database}; +export { self as default, Database }; diff --git a/html/src/repository/shared.js b/html/src/repository/shared.js index de9b5935..f336f6ba 100644 --- a/html/src/repository/shared.js +++ b/html/src/repository/shared.js @@ -105,4 +105,4 @@ class SharedRepository { var self = new SharedRepository(); window.sharedRepository = self; -export {self as default, SharedRepository}; +export { self as default, SharedRepository }; diff --git a/html/src/security.js b/html/src/security.js index d42cb17e..a67e3513 100644 --- a/html/src/security.js +++ b/html/src/security.js @@ -27,12 +27,12 @@ async function encrypt(plaintext, key) { let sharedKey = await window.crypto.subtle.importKey( 'raw', stdAESKey(key), - {name: 'AES-GCM', length: 256}, + { name: 'AES-GCM', length: 256 }, true, ['encrypt'] ); let cipher = await window.crypto.subtle.encrypt( - {name: 'AES-GCM', iv}, + { name: 'AES-GCM', iv }, sharedKey, new TextEncoder().encode(plaintext) ); @@ -49,12 +49,12 @@ async function decrypt(ciphertext, key) { let sharedKey = await window.crypto.subtle.importKey( 'raw', stdAESKey(key), - {name: 'AES-GCM', length: 256}, + { name: 'AES-GCM', length: 256 }, true, ['decrypt'] ); let plaintext = await window.crypto.subtle.decrypt( - {name: 'AES-GCM', iv: text.slice(0, 12)}, + { name: 'AES-GCM', iv: text.slice(0, 12) }, sharedKey, text.slice(12) ); diff --git a/html/src/service/gamelog.js b/html/src/service/gamelog.js index 85b36eda..f6240920 100644 --- a/html/src/service/gamelog.js +++ b/html/src/service/gamelog.js @@ -116,4 +116,4 @@ class GameLogService { var self = new GameLogService(); window.gameLogService = self; -export {self as default, GameLogService as LogWatcherService}; +export { self as default, GameLogService as LogWatcherService }; diff --git a/html/src/service/sqlite.js b/html/src/service/sqlite.js index d01ab5bb..dd29fe3b 100644 --- a/html/src/service/sqlite.js +++ b/html/src/service/sqlite.js @@ -27,4 +27,4 @@ class SQLiteService { var self = new SQLiteService(); window.sqliteService = self; -export {self as default, SQLiteService}; +export { self as default, SQLiteService }; diff --git a/html/src/service/webapi.js b/html/src/service/webapi.js index fa326d1e..23d12215 100644 --- a/html/src/service/webapi.js +++ b/html/src/service/webapi.js @@ -29,4 +29,4 @@ class WebApiService { var self = new WebApiService(); window.webApiService = self; -export {self as default, WebApiService}; +export { self as default, WebApiService }; diff --git a/html/src/vr.js b/html/src/vr.js index ffca80d6..5a07abf2 100644 --- a/html/src/vr.js +++ b/html/src/vr.js @@ -163,7 +163,7 @@ Vue.component('marquee-text', MarqueeText); }); var removeFromArray = function (array, item) { - var {length} = array; + var { length } = array; for (var i = 0; i < length; ++i) { if (array[i] === item) { array.splice(i, 1); @@ -479,7 +479,7 @@ Vue.component('marquee-text', MarqueeText); }; $app.methods.playNoty = function (json) { - var {noty, message, image} = JSON.parse(json); + var { noty, message, image } = JSON.parse(json); var message = escapeTag(message); var text = ''; var img = '';