summaryrefslogtreecommitdiffstats
path: root/help3xsl/help2.js
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2018-08-15 10:27:02 +0200
committerOlivier Hallot <olivier.hallot@libreoffice.org>2018-08-16 13:51:41 +0200
commit7f21cd8b7c0296b13472b42a73239691c98c92b6 (patch)
tree3c85035e29b1c6c582e2eec137f78cd609064f85 /help3xsl/help2.js
parentLet's have Content-Type everywhere. (diff)
downloadhelp-7f21cd8b7c0296b13472b42a73239691c98c92b6.tar.gz
help-7f21cd8b7c0296b13472b42a73239691c98c92b6.zip
Don't embed links to all the languages into every page.
Change-Id: I31f140919a18db55ef5afab9f229afa7eed3e36c Reviewed-on: https://gerrit.libreoffice.org/59149 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
Diffstat (limited to 'help3xsl/help2.js')
-rw-r--r--help3xsl/help2.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/help3xsl/help2.js b/help3xsl/help2.js
index aed610371b..15a744ddb7 100644
--- a/help3xsl/help2.js
+++ b/help3xsl/help2.js
@@ -137,4 +137,16 @@ function existingLang(lang) {
return 'en-US';
}
+
+function setupLanguages(target, page) {
+ var langNav = document.getElementById('langs-nav');
+ if (!langNav.classList.contains('loaded')) {
+ var html = '';
+ languagesSet.forEach(lang => {
+ html += '<a href="' + target + lang + page + '">' + lang + '</a>';
+ });
+ langNav.innerHTML = html;
+ langNav.classList.add('loaded');
+ }
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */