help.html 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <!DOCTYPE html>
  2. <!--
  3. * This file is part of the LibreOffice project.
  4. *
  5. * This Source Code Form is subject to the terms of the Mozilla Public
  6. * License, v. 2.0. If a copy of the MPL was not distributed with this
  7. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  8. -->
  9. <html>
  10. <head>
  11. <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  12. <meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline' 'unsafe-eval' piwik.documentfoundation.org"/>
  13. </head>
  14. <body>
  15. <script type="text/javascript">
  16. function getParameterByName(name, url) {
  17. if (!url) {
  18. url = window.location.href;
  19. }
  20. name = name.replace(/[\[\]]/g, "\\$&");
  21. var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)");
  22. var results = regex.exec(url);
  23. if (!results) {
  24. return null;
  25. }
  26. if (!results[2]) {
  27. return '';
  28. }
  29. return decodeURIComponent(results[2].replace(/\+/g, " "));
  30. }
  31. var url = window.location.href;
  32. var n = url.indexOf('?');
  33. if (n != -1) {
  34. // the URL came from LibreOffice help (F1)
  35. var version = getParameterByName("Version", url);
  36. var query = url.substr(n + 1, url.length);
  37. var newURL = version + '/index.html?' + query;
  38. window.location.replace(newURL);
  39. } else {
  40. window.location.replace('latest/index.html');
  41. }
  42. </script>
  43. </body>
  44. </html>