Added check for VRC client setting trailing slash on icon url

This commit is contained in:
Natsumi
2020-12-15 13:54:12 +13:00
committed by pypy
parent de65faa72a
commit 1895da6958
2 changed files with 11 additions and 1 deletions

View File

@@ -7551,6 +7551,16 @@ import gameLogService from './service/gamelog.js'
});
};
$app.methods.compareCurrentVRCPlusIcon = function (userIcon) {
var url = new URL(API.currentUser.userIcon);
var pathArray = url.pathname.split('/');
var currentUserIcon = pathArray[4];
if (userIcon === currentUserIcon) {
return true;
}
return false;
};
// requres decoding base64 body on C# side
$app.methods.onFileChangeVRCPlusIcon = function (e) {
var files = e.target.files || e.dataTransfer.files;