diff options
author | Jan Holesovsky <kendy@collabora.com> | 2018-08-10 21:06:17 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2018-08-10 21:42:17 +0200 |
commit | b85da9f65fc75dec1077e8dee847c0c9b8a42307 (patch) | |
tree | 3da893c9a4ef9a29279ee127e63a0591c923fb03 | |
parent | 12f5d9d91e4fa37c6f657c1a7b9ef28890a917f7 (diff) |
Reformat for better readibility.
Change-Id: I463e62c7cc476f5433bcb889d83baca35f0649ad
Reviewed-on: https://gerrit.libreoffice.org/58860
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
-rw-r--r-- | help3xsl/index2.html | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/help3xsl/index2.html b/help3xsl/index2.html index c761c33ee1..affbba4ac3 100644 --- a/help3xsl/index2.html +++ b/help3xsl/index2.html @@ -16,49 +16,49 @@ <script type="text/javascript"> var url = window.location.href; var n = url.indexOf('index.html?'); - if (n != -1){ - // the URL came from LibreOffice help (F1) - var target = getParameterByName("Target",url); - var version = getParameterByName("Version",url); - var lang = getParameterByName("Language",url); - var system = getParameterByName("System",url); - var module; - var defaultFile; - var smodule = target.substr(0, target.indexOf('/')); - switch (smodule) { - case "swriter": {defaultFile='text/swriter/main0000.html';module="WRITER";break;} - case "scalc": {defaultFile='text/scalc/main0000.html';module="CALC";break;} - case "simpress": {defaultFile='text/simpress/main0000.html';module="IMPRESS";break;} - case "sdraw": {defaultFile='text/sdraw/main0000.html';module="DRAW";break;} - case "smath": {defaultFile='text/smath/main0000.html';module="MATH";break;} - case "sdatabase": {defaultFile='text/shared/explorer/database/main.html';module="BASE";break;} - case "sbasic": {defaultFile='text/sbasic/shared/main0601.html';module="BASIC";break;} - default: {defaultFile='text/shared/main0000.html';module="WRITER";break;} - } - var bookmark = target.slice(target.indexOf('/') + 1, target.length); - var file = map[bookmark]; - // check first if a root bookmark @@nowidget@@ can be used - if (file === undefined){ - var b2 = bookmark.substring(0, bookmark.lastIndexOf("/")) + '/@@nowidget@@'; - file = map[b2]; - } - // rebuild URL - if (file === undefined){ - var newURL = lang + '/' + defaultFile + '?System=' + system + '&DbPAR=' + module; - }else{ - var indx = file.indexOf('#'); - var bm = file.substr(indx,file.length); - file = file.substr(0,indx); - var newURL = lang + '/' + file + '?System=' + system + '&DbPAR=' + module + bm; - } - window.open(newURL,'_self'); - }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.open(userLang + '/text/shared/main0108.html?&DbPAR=WRITER&System=WIN','_self'); + if (n != -1) { + // the URL came from LibreOffice help (F1) + var target = getParameterByName("Target",url); + var version = getParameterByName("Version",url); + var lang = getParameterByName("Language",url); + var system = getParameterByName("System",url); + var module; + var defaultFile; + var smodule = target.substr(0, target.indexOf('/')); + switch (smodule) { + case "swriter": {defaultFile='text/swriter/main0000.html';module="WRITER";break;} + case "scalc": {defaultFile='text/scalc/main0000.html';module="CALC";break;} + case "simpress": {defaultFile='text/simpress/main0000.html';module="IMPRESS";break;} + case "sdraw": {defaultFile='text/sdraw/main0000.html';module="DRAW";break;} + case "smath": {defaultFile='text/smath/main0000.html';module="MATH";break;} + case "sdatabase": {defaultFile='text/shared/explorer/database/main.html';module="BASE";break;} + case "sbasic": {defaultFile='text/sbasic/shared/main0601.html';module="BASIC";break;} + default: {defaultFile='text/shared/main0000.html';module="WRITER";break;} + } + var bookmark = target.slice(target.indexOf('/') + 1, target.length); + var file = map[bookmark]; + // check first if a root bookmark @@nowidget@@ can be used + if (file === undefined) { + var b2 = bookmark.substring(0, bookmark.lastIndexOf("/")) + '/@@nowidget@@'; + file = map[b2]; + } + // rebuild URL + if (file === undefined) { + var newURL = lang + '/' + defaultFile + '?System=' + system + '&DbPAR=' + module; + } else { + var indx = file.indexOf('#'); + var bm = file.substr(indx,file.length); + file = file.substr(0,indx); + var newURL = lang + '/' + file + '?System=' + system + '&DbPAR=' + module + bm; + } + window.open(newURL,'_self'); + } 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.open(userLang + '/text/shared/main0108.html?&DbPAR=WRITER&System=WIN','_self'); } </script> </body> |