<button type="button" id="traffic-lights-button" class="info-button">traffic-lights</button>

<div id="traffic-lights-dialog" style="display:none;">
  <%= render partial: 'shared/traffic_lights_bulb_info' %>
  <%= render partial: 'shared/traffic_lights_click_info' %>
  <div class="info">Tests must complete in <%= @manifest['max_seconds'] %> seconds</div>
</div>

<script>
'use strict';
$(() => {

  cd.trafficLightsButton = () => $('#traffic-lights-button');

  cd.createTip(cd.trafficLightsButton(), 'show traffic-light information');

  cd.trafficLightsButton().click(() => openTrafficLightsInfoDialog());

  const openTrafficLightsInfoDialog = () => {
    $('#traffic-lights-dialog').dialog({
              width: 400,
           autoOpen: true,
      closeOnEscape: true,
              modal: true,
              title: cd.dialogTitle('traffic-lights'),
        beforeClose: () => cd.kata.editor.refocus()
    });
  };

});
</script>

<button type="button" id="traffic-lights-button" class="info-button">traffic-lights</button>

<div id="traffic-lights-dialog" style="display:none;">
  <%= render partial: 'shared/traffic_lights_bulb_info' %>
  <%= render partial: 'shared/traffic_lights_click_info' %>
</div>

<script>
'use strict';
$(() => {

  cd.trafficLightsButton = () => $('#traffic-lights-button');

  cd.createTip(cd.trafficLightsButton(), 'show traffic-light information');

  cd.trafficLightsButton().click(() => openTrafficLightsInfoDialog());

  const openTrafficLightsInfoDialog = () => {
    const manifest = cd.kata.manifest(cd.kata.id);
    $('#traffic-lights-dialog').append(
      $('<div>', { class:'info' }).html(`Tests must complete in ${manifest.max_seconds} seconds`)
    ).dialog({
              width: 400,
           autoOpen: true,
      closeOnEscape: true,
              modal: true,
              title: cd.dialogTitle('traffic-lights'),
        beforeClose: () => cd.kata.editor.refocus()
    });
  };

});
</script>

Use JS to get manifest.max_seconds value in traffic-lights dialog info.
Use JS to get manifest.max_seconds value in traffic-lights dialog info.
