Log tofu detection event
This only works if webfonts enabled (the checkbox is checked). Change-Id: Ibbedc6a34dacb983f156d8a33afa5ab625e32f5f
This commit is contained in:
@@ -168,9 +168,15 @@
|
||||
detectTofu( $.uls.data.getAutonym( language ) );
|
||||
|
||||
if ( tofu ) {
|
||||
mw.log( 'tofu detected for ' + language );
|
||||
// Cache the languages with tofu
|
||||
tofuLanguages[language] = true;
|
||||
// Log the tofu detection only once per page per language
|
||||
if ( !tofuLanguages[language] ) {
|
||||
mw.log( 'tofu detected for ' + language );
|
||||
mw.hook( 'mw.uls.webfonts.tofudetected' ).fire( language );
|
||||
|
||||
// Cache the languages with tofu
|
||||
tofuLanguages[language] = true;
|
||||
}
|
||||
|
||||
font = autonym ? 'Autonym' : defaultFont;
|
||||
} else {
|
||||
// No tofu and no font preference. Use system font.
|
||||
|
||||
Reference in New Issue
Block a user