Skip to content
Snippets Groups Projects
Commit 8794df00 authored by khawkins98's avatar khawkins98
Browse files

Allow prevention of auto-loading script.js

Also for #77
parent 1eda5aa7
No related branches found
No related tags found
No related merge requests found
......@@ -11,7 +11,13 @@ function ebiFrameworkInvokeScripts() {
ebiFrameworkCookieBanner();
}
// init
/* All scripts are automatically loaded, unless the page asked us not to.
* Configurable with a data attribute:
* <body data-ebiFrameworkInvokeScripts="false">
**/
document.addEventListener("DOMContentLoaded", function(event) {
ebiFrameworkInvokeScripts();
var bodyData = document.body.dataset;
if (bodyData.ebiFrameworkInvokeScripts != false) {
ebiFrameworkInvokeScripts();
}
});
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment