Unhide material icons once the font has loaded

pull/3669/head
Isaac Connor 2023-02-28 13:58:02 -05:00
parent ad4bc04bfb
commit ecf91ff6a0
1 changed files with 8 additions and 0 deletions

View File

@ -1030,3 +1030,11 @@ function post(path, params, method='post') {
document.body.appendChild(form);
form.submit();
}
const font = new FontFaceObserver('Material Icons', { weight: 400 });
font.load().then(function () {
console.log('Font is available');
$j('.material-icons').css('display','inline-block');
}, function () {
console.log('Font is not available');
});