summaryrefslogtreecommitdiff
path: root/help3xsl/index2.html
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2018-08-14 16:34:25 +0200
committerJan Holesovsky <kendy@collabora.com>2018-08-16 09:13:39 +0200
commit73023bcc0dba68f6677bc02cdad75145180e2b11 (patch)
tree66fa7eb6279cd0752e012e286c422b1162d96cea /help3xsl/index2.html
parent0d068dc8d5cd64f89c8a8e3d0a6bef6ed9e1ee87 (diff)
Limit the online help only to the built languages.
Change-Id: Ib81dbd9a4047d9bb63761a43ef0b183a450b03f1 Reviewed-on: https://gerrit.libreoffice.org/59047 Tested-by: Jenkins Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'help3xsl/index2.html')
-rw-r--r--help3xsl/index2.html9
1 files changed, 3 insertions, 6 deletions
diff --git a/help3xsl/index2.html b/help3xsl/index2.html
index 6a9a1a6c8e..ad12320433 100644
--- a/help3xsl/index2.html
+++ b/help3xsl/index2.html
@@ -11,6 +11,7 @@
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline' 'unsafe-eval' piwik.documentfoundation.org *.google.com *.googleapis.com"/>
<script type="text/javascript" src="help2.js"></script>
<script type="text/javascript" src="hid2file.js"></script>
+ <script type="text/javascript" src="languages.js"></script>
</head>
<body>
<script type="text/javascript">
@@ -20,7 +21,7 @@
// the URL came from LibreOffice help (F1)
var target = getParameterByName("Target",url);
var version = getParameterByName("Version",url);
- var lang = getParameterByName("Language",url);
+ var lang = existingLang(getParameterByName("Language", url));
var system = getParameterByName("System",url);
var module;
var defaultFile;
@@ -54,11 +55,7 @@
window.location.href = newURL;
} else {
// URL came from elsewhere, direct access to webroot, we redirect to main Help page
- var userLang = navigator.language;
- if (userLang === undefined) {
- userlang="en-US";
- }
- window.location.href = userLang + '/text/shared/main0108.html?&DbPAR=WRITER&System=WIN';
+ window.location.href = existingLang(navigator.language) + '/text/shared/main0108.html?&DbPAR=WRITER&System=WIN';
}
</script>
</body>