summaryrefslogtreecommitdiff
path: root/help3xsl/help2.js
diff options
context:
space:
mode:
Diffstat (limited to 'help3xsl/help2.js')
-rw-r--r--help3xsl/help2.js16
1 files changed, 15 insertions, 1 deletions
diff --git a/help3xsl/help2.js b/help3xsl/help2.js
index 5a48c394fe..0003b72d82 100644
--- a/help3xsl/help2.js
+++ b/help3xsl/help2.js
@@ -65,6 +65,20 @@ function setSystemSpan(spanID) {
}
}
}
+// Find spans that need the switch treatment and give it to them
+var spans = document.querySelectorAll("[class^=switch]");
+var n = spans.length;
+for (z = 0; z < n; z++) {
+ var id = spans[z].getAttribute("id");
+ if (id === null) {
+ continue;
+ }
+ else if (id.startsWith("swlnsys")) {
+ setSystemSpan(id);
+ } else {
+ setApplSpan(id);
+ }
+}
/* add &DbPAR= and &System= to the links in DisplayArea div */
/* skip for object files */
function fixURL(module, system) {
@@ -168,7 +182,7 @@ function setupLanguages(target, page) {
}
// Test, if we are online
-if (document.body.getElementsByTagName('meta')[0].getAttribute('itemprop') === 'version') {
+if (document.body.getElementsByTagName('meta')) {
var _paq = _paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['disableCookies']);