summaryrefslogtreecommitdiffstats
path: root/common/html-coverpage/coverpage.js
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2017-01-11 17:04:02 +1100
committerChris Johns <chrisj@rtems.org>2017-01-11 17:04:02 +1100
commit2591ca639056db4f6abe294cc7a81bb831c8f7f9 (patch)
tree30ba1d0a11d4e097fe5750e2024630bdfbea8036 /common/html-coverpage/coverpage.js
parenthtml: Add support for an HTML cover page for releases. (diff)
downloadrtems-docs-2591ca639056db4f6abe294cc7a81bb831c8f7f9.tar.bz2
html: Embed the catalogue XML in JS.
The is to work around a security issue with Chrome on Windows. This patches let the cover page load on Chrome and Edge on Windows 10.
Diffstat (limited to 'common/html-coverpage/coverpage.js')
-rw-r--r--common/html-coverpage/coverpage.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/common/html-coverpage/coverpage.js b/common/html-coverpage/coverpage.js
new file mode 100644
index 0000000..4655c29
--- /dev/null
+++ b/common/html-coverpage/coverpage.js
@@ -0,0 +1,13 @@
+/*!
+ * Copyright 2017 Chris Johns <chrisj@rtems.org>
+ */
+
+/*
+ * Embed the XML catalogue in this JS code to get around the Chrome on Windows
+ * security "feature" where loading of a local disk file under the same path as
+ * the HTML Chrome just loaded from disk is not allowed.
+ */
+function coverPageCatalogue() {
+ xml = '@CATALOGUE';
+ paintCatalogue($.parseXML(xml));
+}