Universal-Bypass/html/translations.js
2018-05-28 18:27:15 +02:00

15 lines
420 B
JavaScript

let elms=document.querySelectorAll("[data-message]")
for(let i in elms)
{
let elm=elms[i]
if(elm instanceof HTMLElement)
elm.textContent=chrome.i18n.getMessage(elm.getAttribute("data-message"))
}
elms=document.querySelectorAll("[data-placeholder]")
for(let i in elms)
{
let elm=elms[i]
if(elm instanceof HTMLElement)
elm.setAttribute("placeholder",chrome.i18n.getMessage(elm.getAttribute("data-placeholder")))
}