Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Voormann2021-04-21 21:42:48 +0000
committerWim Jongman2021-05-05 09:53:52 +0000
commit62252cd622e280d0be692fafcf18d2981b97b2d2 (patch)
treeb2b02397b434f677e379c82fb8aaaa9f6fc06612
parentc6aa00e83fa740ea27573ad2292e5c3cd97daae5 (diff)
downloadeclipse.platform.ua-62252cd622e280d0be692fafcf18d2981b97b2d2.tar.gz
eclipse.platform.ua-62252cd622e280d0be692fafcf18d2981b97b2d2.tar.xz
eclipse.platform.ua-62252cd622e280d0be692fafcf18d2981b97b2d2.zip
Bug 571831 - Modernized help UI: Fix showing start pageI20210506-1800I20210505-1800
On startup, the content page should be shown independent which language is used (not only when the default language English is used). For example, with the Japanese language pack from Eclipse Babel enabled by "-nl ja", when opening the help, the content page should not be empty. Change-Id: I82a79d741f1c519fec6a2f4b2bf988ea9e3ce57f Signed-off-by: Holger Voormann <eclipse@voormann.de> Reviewed-on: https://git.eclipse.org/r/c/platform/eclipse.platform.ua/+/179641 Tested-by: Platform Bot <platform-bot@eclipse.org> Reviewed-by: Harald Hermann <harald.hermann@advantest.com> Reviewed-by: Wim Jongman <wim.jongman@remainsoftware.com>
-rw-r--r--org.eclipse.help.webapp/m/index.js11
1 files changed, 3 insertions, 8 deletions
diff --git a/org.eclipse.help.webapp/m/index.js b/org.eclipse.help.webapp/m/index.js
index 34e3c73f2..1553ab913 100644
--- a/org.eclipse.help.webapp/m/index.js
+++ b/org.eclipse.help.webapp/m/index.js
@@ -587,14 +587,9 @@
// ...default start/cover page
remoteRequest(BASE_URL + 'advanced/content.jsp', function(responseText) {
- var start = responseText.indexOf('title="Topic View" src=\'');
- if (start > 0) {
- var end = responseText.indexOf("'", start + 24);
- var element = createElement(null, 'p');
- element.innerHTML = responseText.substring(start + 24, end);
- getElementById('c').src = BASE_URL
- + 'topic/'
- + (element.textContent ? element.textContent : element.innerText);
+ var match = new RegExp('name="ContentViewFrame"\\s+title="[^"]+"\\s+src=\'([^\']+)\'', 'i').exec(responseText);
+ if (match) {
+ getElementById('c').src = BASE_URL + 'topic/' + decodeHtml(match[1]);
updateDeepLink();
}
});

Back to the top