From 2591ca639056db4f6abe294cc7a81bb831c8f7f9 Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Wed, 11 Jan 2017 17:04:02 +1100 Subject: 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. --- common/html-coverpage/coverpage.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 common/html-coverpage/coverpage.js (limited to 'common/html-coverpage/coverpage.js') 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 + */ + +/* + * 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)); +} -- cgit v1.2.3