mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-18 22:33:50 +02:00
Fix status flapping
dumb fix for dumb bug
This commit is contained in:
@@ -1183,6 +1183,12 @@ speechSynthesis.getVoices();
|
||||
json.$online_for = API.currentUser.$online_for;
|
||||
json.$offline_for = API.currentUser.$offline_for;
|
||||
}
|
||||
if (typeof json.statusDescription !== 'undefined') {
|
||||
json.statusDescription = $app.replaceBioSymbols(json.statusDescription);
|
||||
}
|
||||
if (typeof json.bio !== 'undefined') {
|
||||
json.bio = $app.replaceBioSymbols(json.bio);
|
||||
}
|
||||
if (typeof ref === 'undefined') {
|
||||
ref = {
|
||||
id: '',
|
||||
@@ -12710,6 +12716,46 @@ speechSynthesis.getVoices();
|
||||
}
|
||||
});
|
||||
|
||||
$app.methods.replaceBioSymbols = function (text) {
|
||||
if (!text) {
|
||||
return;
|
||||
}
|
||||
var symbolList = {
|
||||
'@': '@',
|
||||
'#': '#',
|
||||
'$': '$',
|
||||
'%': '%',
|
||||
'&': '&',
|
||||
'=': '=',
|
||||
'+': '+',
|
||||
'/': '⁄',
|
||||
'\\': '\',
|
||||
';': ';',
|
||||
':': '˸',
|
||||
',': '‚',
|
||||
'?': '?',
|
||||
'!': 'ǃ',
|
||||
'"': '"',
|
||||
'<': '≺',
|
||||
'>': '≻',
|
||||
'.': '․',
|
||||
'^': '^',
|
||||
'{': '{',
|
||||
'}': '}',
|
||||
'[': '[',
|
||||
']': ']',
|
||||
'(': '(',
|
||||
')': ')',
|
||||
'|': '|',
|
||||
'*': '∗'
|
||||
};
|
||||
for (var key in symbolList) {
|
||||
var regex = new RegExp(symbolList[key], "g");
|
||||
text = text.replace(regex, key);
|
||||
}
|
||||
return text;
|
||||
};
|
||||
|
||||
$app = new Vue($app);
|
||||
window.$app = $app;
|
||||
}());
|
||||
|
||||
Reference in New Issue
Block a user