2 * DO NOT EDIT THIS FILE.
3 * See the following change record for more information,
4 * https://www.drupal.org/node/2815083
9 function findActiveStep(steps) {
10 for (var i = 0; i < steps.length; i++) {
11 if (steps[i].className === 'is-active') {
16 if (steps[steps.length - 1].className === 'done') {
22 function installStepsSetup() {
23 var steps = document.querySelectorAll('.task-list li');
25 var header = document.querySelector('header[role="banner"]');
26 var stepIndicator = document.createElement('div');
27 stepIndicator.className = 'step-indicator';
28 stepIndicator.innerHTML = findActiveStep(steps) + '/' + steps.length;
29 header.appendChild(stepIndicator);
33 if (document.addEventListener) {
34 document.addEventListener('DOMContentLoaded', installStepsSetup);