anchor.diff:      param.nowIndex = index;
       // preserve diff on/off state
       if (diffCheckBox().is(':checked')) {
  -      param.wasIndex = (getPrevEventIndex() || 0);
  +      param.wasIndex = (prevEventIndex() || 0);
       } else {
         param.wasIndex = index;
       }
  
positive.code:   //-----------------------------------------
  
    const refreshEventControls = () => {
      const prevIndex = getPrevEventIndex();
      const nextIndex = getNextEventIndex();
      refreshTag($('#prev-tag'), prevIndex);
      $('#tag-number-container').html(tagHtml());
      refreshTag($('#next-tag'), nextIndex);
    };
  
    // - - - - - - - - - - - - - - - - - - - - - - - -
  
    const getPrevEventIndex = () => {
      const n = getEventIndex(param.nowIndex);
      if (n === null || n === 1) {
        return null;
      } else {
        return param.events[n - 1].index;
      }
    };
  
    // - - - - - - - - - - - - - - - - - - - - - - - -
  
    const getNextEventIndex = () => {
      const n = getEventIndex(param.nowIndex);
      if (n === null || n === param.events.length - 1) {
        return null;
      } else {
        return param.events[n + 1].index;
      }
    };
  
    // - - - - - - - - - - - - - - - - - - - - - - - -
  
    const getEventIndex = (n) => {
      // Finds the index of the event in the param.events
      // array whose index equals n.
      for (let i = 0; i !== param.events.length; i++) {
        if (param.events[i].index === n) {
          return i;
        }
      }
      return null;
    };
  
    // - - - - - - - - - - - - - - - - - - - - - - - -
  
    const tagHtml = () => {
      return tagTrafficLightHtml(param.nowIndex);
    };
  
    // - - - - - - - - - - - - - - - - - - - - - - - -
  
    const tagTrafficLightHtml = (n) => {
      const i = getEventIndex(n);
      const colour = (i === null) ? '' : param.events[i].colour;
      return `<div id="tag-number" class="${colour}">${n}</div>`;
    };
  
  
negative.code:       .bind('click', () => {
          param.id = id;
          if (inDiffMode()) {
            // Move to the new avatar's first event.
            show(1);
          } else {
            // Move to the new avatar's last event.
            const lastIndex = -1;
            param.wasIndex = lastIndex;
            param.nowIndex = lastIndex;
  