<commit_before>/* global Puzzle:false */
'use strict';

class NotificationPuzzle extends Puzzle {
  constructor (id, game) {
    super(id, game);

    this.granted = window.Notification.permission === 'granted';

    window.Notification
      .requestPermission()
      .then(result => {
        this.granted = window.Notification.permission === 'granted';
        if (result !== 'granted') throw new Error('You must allow notification to solve this puzzle.');
      });
  }

  onActivate () {
    if (this.granted) {
      const n = new Notification('title');
      n.addEventListener('click', ev => {
        n.close();
        this.complete();
      });
    }
  }
}<commit_msg>increased metaness<commit_after>/* global Puzzle:false */
'use strict';

class NotificationPuzzle extends Puzzle {
  constructor (id, game) {
    super(id, game);

    this.granted = window.Notification.permission === 'granted';

    window.Notification
      .requestPermission()
      .then(result => {
        this.granted = window.Notification.permission === 'granted';
        if (result !== 'granted') throw new Error('You must allow notifications to solve this puzzle.');
      });
  }

  onActivate () {
    if (this.granted) {
      const n1 = new Notification('hey there');
      n1.addEventListener('click', ev => {
        n1.close();
        const n2 = new Notification('you\'re getting good at this');
        n2.addEventListener('click', ev => {
          n2.close();
          const n3 = new Notification('you deserve a cookie');
          n3.addEventListener('click', ev => {
            n3.close();
            const n4 = new Notification('have a cookie 🍪');
            n4.addEventListener('click', ev => {
              n4.close();
              const n5 = new Notification('oh, you wanted the solution instead?');
              n5.addEventListener('click', ev => {
                n5.close();
                this.complete();
                const n6 = new Notification('there you go. happy?');
                n6.addEventListener('click', ev => {
                  n6.close();
                  const n7 = new Notification('good. happy puzzling!');
                  n7.addEventListener('click', ev => {
                    n7.close();
                  });
                });
              });
            });
          });
        });
      });
    }
  }
}
{'fraction_non_alphanumeric': 0.14273612875900044, 'fraction_numerical': 0.008894536213468869, 'mean_word_length': 1.9378109452736318, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5975906', 'n_tokens_mistral': 655, 'n_tokens_neox': 618, 'n_words': 158}