2 * DO NOT EDIT THIS FILE.
3 * See the following change record for more information,
4 * https://www.drupal.org/node/2815083
8 (function ($, Drupal, drupalSettings) {
9 var pathInfo = drupalSettings.path;
10 var escapeAdminPath = sessionStorage.getItem('escapeAdminPath');
11 var windowLocation = window.location;
13 if (!pathInfo.currentPathIsAdmin && !/destination=/.test(windowLocation.search)) {
14 sessionStorage.setItem('escapeAdminPath', windowLocation);
17 Drupal.behaviors.escapeAdmin = {
18 attach: function attach() {
19 var $toolbarEscape = $('[data-toolbar-escape-admin]').once('escapeAdmin');
20 if ($toolbarEscape.length && pathInfo.currentPathIsAdmin) {
21 if (escapeAdminPath !== null) {
22 $toolbarEscape.attr('href', escapeAdminPath);
24 $toolbarEscape.text(Drupal.t('Home'));
29 })(jQuery, Drupal, drupalSettings);