mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-03 22:47:03 +03:00
Replace deprecated String.substr with String.slice
This commit is contained in:
parent
2719f08e26
commit
b98762dd68
17 changed files with 54 additions and 54 deletions
|
|
@ -10,16 +10,16 @@ const
|
|||
i18nToNode = element => {
|
||||
const key = element.dataset.i18n;
|
||||
if (key) {
|
||||
if ('[' === key.substr(0, 1)) {
|
||||
switch (key.substr(0, 6)) {
|
||||
if ('[' === key.slice(0, 1)) {
|
||||
switch (key.slice(0, 6)) {
|
||||
case '[html]':
|
||||
element.innerHTML = i18n(key.substr(6));
|
||||
element.innerHTML = i18n(key.slice(6));
|
||||
break;
|
||||
case '[place':
|
||||
element.placeholder = i18n(key.substr(13));
|
||||
element.placeholder = i18n(key.slice(13));
|
||||
break;
|
||||
case '[title':
|
||||
element.title = i18n(key.substr(7));
|
||||
element.title = i18n(key.slice(7));
|
||||
break;
|
||||
// no default
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue