parent
1f7ff87a53
commit
94bf6dd3a2
@ -0,0 +1,19 @@ |
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
document.addEventListener('DOMContentLoaded', function (){ |
||||
|
||||
if (window.user) { |
||||
const isoCode = window.user.locale; |
||||
const translateElement = document.querySelector('.mce-translatehtml'); |
||||
if (translateElement) { |
||||
document.querySelectorAll('.mce-translatehtml').forEach(function (el) { |
||||
el.style.display = 'none'; |
||||
}); |
||||
const selectedLang = document.querySelectorAll('[lang="' + isoCode + '"]'); |
||||
selectedLang.forEach(function (userLang) { |
||||
userLang.style.display = 'block'; |
||||
}); |
||||
} |
||||
} |
||||
|
||||
}); |
Loading…
Reference in new issue