This is an automated email from the git hooks/post-receive script.
cohosh pushed a commit to branch main in repository pluggable-transports/snowflake-webext.
commit 1d669a6852df74f1049d6de638c783ea033051ab Author: luciole luciole@systemli.org AuthorDate: Wed Nov 2 13:37:28 2022 +0100
change alignment by setting dir attribute --- static/index.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/static/index.js b/static/index.js index 6861459..02f04a8 100644 --- a/static/index.js +++ b/static/index.js @@ -65,9 +65,11 @@ fetch(`./_locales/${gotLang}/website.json`) .then((json) => { var language = document.getElementById('language-switcher'); var lang = `${gotLang}`; - if ((lang == "ar") || (lang == "fa")) { - document.body.setAttribute('style', 'text-align:right'); - } + if (lang == "ar" || lang == "fa" || lang == "he" || lang == "ur") { + document.documentElement.dir = "rtl"; + } else { + document.documentElement.dir = "ltr"; + } language.innerText = `${availableLangs.get(lang)} (${lang})`; var messages = new Messages(json); fill(document.body, (m) => {