annotate core/misc/drupalSettingsLoader.js @ 2:5311817fb629

Theme updates
author Chris Cannam
date Tue, 10 Jul 2018 13:19:18 +0000
parents c75dbcec494b
children
rev   line source
Chris@0 1 /**
Chris@0 2 * DO NOT EDIT THIS FILE.
Chris@0 3 * See the following change record for more information,
Chris@0 4 * https://www.drupal.org/node/2815083
Chris@0 5 * @preserve
Chris@0 6 **/
Chris@0 7
Chris@0 8 (function () {
Chris@0 9 var 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"]');
Chris@0 10
Chris@0 11 window.drupalSettings = {};
Chris@0 12
Chris@0 13 if (settingsElement !== null) {
Chris@0 14 window.drupalSettings = JSON.parse(settingsElement.textContent);
Chris@0 15 }
Chris@0 16 })();