mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-20 22:20:39 +01:00
Firefox copium for persona images
This commit is contained in:
parent
41f53f4162
commit
f12aeeed90
@ -5490,6 +5490,7 @@ function highlightSelectedAvatar() {
|
||||
* @returns {JQuery<HTMLElement>} Avatar block
|
||||
*/
|
||||
function getUserAvatarBlock(name) {
|
||||
const isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
|
||||
const template = $('#user_avatar_template .avatar-container').clone();
|
||||
const personaName = power_user.personas[name];
|
||||
const personaDescription = power_user.persona_descriptions[name]?.description;
|
||||
@ -5498,7 +5499,11 @@ function getUserAvatarBlock(name) {
|
||||
template.attr('imgfile', name);
|
||||
template.find('.avatar').attr('imgfile', name).attr('title', name);
|
||||
template.toggleClass('default_persona', name === power_user.default_persona);
|
||||
template.find('img').attr('src', getUserAvatar(name));
|
||||
let avatarUrl = getUserAvatar(name);
|
||||
if (isFirefox) {
|
||||
avatarUrl += '?t=' + Date.now();
|
||||
}
|
||||
template.find('img').attr('src', avatarUrl);
|
||||
$('#user_avatar_block').append(template);
|
||||
return template;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user