summaryrefslogtreecommitdiffstats
path: root/help3xsl/help.js
diff options
context:
space:
mode:
authorIlmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>2018-11-21 20:42:38 +0200
committerOlivier Hallot <olivier.hallot@libreoffice.org>2018-11-22 16:31:18 +0100
commita678c05324cff46eace7c439a4595a3014fa8576 (patch)
treedce9f14519ee97bfa3737f4a510530daa9e4e078 /help3xsl/help.js
parentHelp files: http -> https (diff)
downloadhelp-a678c05324cff46eace7c439a4595a3014fa8576.tar.gz
help-a678c05324cff46eace7c439a4595a3014fa8576.zip
Stop index headers from being linkified
Change-Id: If445b693feb17fd943eced3a222a20b26039891d Reviewed-on: https://gerrit.libreoffice.org/63759 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
Diffstat (limited to 'help3xsl/help.js')
-rw-r--r--help3xsl/help.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/help3xsl/help.js b/help3xsl/help.js
index 2237ed5b18..e806eeed4f 100644
--- a/help3xsl/help.js
+++ b/help3xsl/help.js
@@ -34,8 +34,8 @@ bookmarks.forEach(function(obj) {
});
function fullList() {
document.getElementsByClassName("index")[0].innerHTML = fullLinkified;
- Paginator(document.getElementsByClassName("index")[0]);
addIds();
+ Paginator(document.getElementsByClassName("index")[0]);
}
// add id to the first items of each category in the index. CSS ::before rule adds the heading text
function addIds() {
@@ -45,7 +45,8 @@ function addIds() {
modules.forEach(function(module) {
var moduleHeader = document.getElementsByClassName(module)[0];
if (typeof moduleHeader !== 'undefined') {
- moduleHeader.setAttribute("id", module);
+ // let's wrap the header in a span, so the ::before element will not become a link
+ moduleHeader.outerHTML = '<span id="' + module + '" class="' + module + '">' + moduleHeader.outerHTML + '</span>';
}
});
}
@@ -65,8 +66,8 @@ var filter = function() {
filtered += '<a href="' + result.obj['url'] + '" class="' + result.obj['app'] + '">' + fuzzysort.highlight(result) + '</a>';
});
document.getElementsByClassName("index")[0].innerHTML = filtered;
- Paginator(document.getElementsByClassName("index")[0]);
addIds();
+ Paginator(document.getElementsByClassName("index")[0]);
};
function debounce(fn, wait) {
var timeout;