X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmisc%2FdrupalSettingsLoader.es6.js;h=63494d9c1f33830f7748e301cd3af2acdf504948;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hp=2e58071f3138093e9e8d1e73e0095bd52ee61c82;hpb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;p=yaffs-website diff --git a/web/core/misc/drupalSettingsLoader.es6.js b/web/core/misc/drupalSettingsLoader.es6.js index 2e58071f3..63494d9c1 100644 --- a/web/core/misc/drupalSettingsLoader.es6.js +++ b/web/core/misc/drupalSettingsLoader.es6.js @@ -3,9 +3,11 @@ * Parse inline JSON and initialize the drupalSettings global object. */ -(function () { +(function() { // Use direct child elements to harden against XSS exploits when CSP is on. - const settingsElement = document.querySelector('head > script[type="application/json"][data-drupal-selector="drupal-settings-json"], body > script[type="application/json"][data-drupal-selector="drupal-settings-json"]'); + const settingsElement = document.querySelector( + 'head > script[type="application/json"][data-drupal-selector="drupal-settings-json"], body > script[type="application/json"][data-drupal-selector="drupal-settings-json"]', + ); /** * Variable generated by Drupal with all the configuration created from PHP. @@ -19,4 +21,4 @@ if (settingsElement !== null) { window.drupalSettings = JSON.parse(settingsElement.textContent); } -}()); +})();