Introduce CSP headers to Kalamar (start of #72)
Change-Id: I84b7ff0accab3d783ad653fae123c25fee1d92b9
diff --git a/dev/js/src/init.js b/dev/js/src/init.js
index 58c6472..6a781b6 100644
--- a/dev/js/src/init.js
+++ b/dev/js/src/init.js
@@ -52,6 +52,18 @@
const d = document;
+ // Remove the no-js class from the body
+ d.body.classList.remove('no-js');
+
+ // Set base URL
+ KorAP.URL = d.body.getAttribute('data-korap-url') || "";
+
+ // Get koralQuery response
+ const kqe = d.getElementById('koralQuery');
+ if (kqe !== null) {
+ KorAP.koralQuery = JSON.parse(kqe.getAttribute('data-koralquery') || "");
+ };
+
// Create suffix if KorAP is run in a subfolder
KorAP.session = sessionClass.create(
KorAP.URL.length > 0 ? 'kalamarJS-' + KorAP.URL.slugify() : 'kalamarJS'
diff --git a/dev/scss/base/base.scss b/dev/scss/base/base.scss
index 2ad7b95..be195e3 100644
--- a/dev/scss/base/base.scss
+++ b/dev/scss/base/base.scss
@@ -81,6 +81,10 @@
clear: both;
}
+iframe {
+ border-width: 0;
+}
+
blockquote {
border-radius: $standard-border-radius;
padding: 2pt 5pt 2pt 20pt;