summaryrefslogtreecommitdiffstats
path: root/help3xsl
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2018-08-15 09:06:34 +0200
committerJan Holesovsky <kendy@collabora.com>2018-08-16 09:19:52 +0200
commit8d728edf4a9bbf066c3173a0349798d9465bad61 (patch)
tree1b66b0af558a005661a0527f74275e65385ad070 /help3xsl
parentThe <version>/index.html can default correctly, no need to do it in the root. (diff)
downloadhelp-8d728edf4a9bbf066c3173a0349798d9465bad61.tar.gz
help-8d728edf4a9bbf066c3173a0349798d9465bad61.zip
Try to detect the system at least a bit.
Change-Id: I5c5243d56cf85eeb7cd857c7d9f6da5cd305b429 Reviewed-on: https://gerrit.libreoffice.org/59049 Tested-by: Jenkins Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'help3xsl')
-rw-r--r--help3xsl/index2.html7
1 files changed, 5 insertions, 2 deletions
diff --git a/help3xsl/index2.html b/help3xsl/index2.html
index 8b58a4f6e0..e09b68e6f9 100644
--- a/help3xsl/index2.html
+++ b/help3xsl/index2.html
@@ -21,7 +21,7 @@
// the URL came from LibreOffice help (F1)
var target = getParameterByName("Target",url);
var lang = existingLang(getParameterByName("Language", url));
- var system = getParameterByName("System",url);
+ var system = getParameterByName("System", url);
var module;
var defaultFile;
var smodule = target.substr(0, target.indexOf('/'));
@@ -54,7 +54,10 @@
window.location.href = newURL;
} else {
// URL came from elsewhere, direct access to webroot, we redirect to main Help page
- window.location.href = existingLang(navigator.language) + '/text/shared/main0108.html?&DbPAR=WRITER&System=WIN';
+ var system = 'WIN';
+ if (navigator.userAgent.indexOf("Mac") != -1) system = 'MAC';
+ if (navigator.userAgent.indexOf("Linux") != -1) system = 'UNIX';
+ window.location.href = existingLang(navigator.language) + '/text/shared/main0108.html?&DbPAR=WRITER&System=' + system;
}
</script>
</body>