<commit_before><!doctype html>
<head>
    {% load staticfiles %}
    <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"/>
    <link rel="stylesheet" href="https://code.getmdl.io/1.1.3/material.indigo-pink.min.css" />
    <link rel="stylesheet" href="{% static "styles/styles.css" %}"/>
    <script defer src="https://code.getmdl.io/1.1.1/material.min.js"></script>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="icon" type="image/vnd.microsoft.icon"
     href="{% static "favicon.ico" %}" />
    <title>Available Keys</title>
</head>
<body bgcolor="#DBDBDB">

<!-- Always shows a header, even in smaller screens. -->
<div class="mdl-layout mdl-js-layout mdl-layout--fixed-header">
  <header class="mdl-layout__header">
    <div class="mdl-layout__header-row">
      <!-- Title -->
      <span class="mdl-layout-title responsive-title">Available Games</span>
      <!-- Add spacer, to align navigation to the right -->
      <!-- Navigation. We hide it in small screens. -->
        <div class="mdl-layout-spacer"></div>
      <div class="mdl-textfield mdl-js-textfield mdl-textfield--expandable
                  mdl-textfield--floating-label mdl-textfield--align-right">
      <form id="sort" method="get" action="/store" style="margin-left: 5px;">
        <label class="mdl-button mdl-js-button mdl-button--icon"
               for="fixed-header-drawer-exp">
          <i class="material-icons">search</i>
        </label>
        <div class="mdl-textfield__expandable-holder">
          <input class="mdl-textfield__input" type="text" name="query"
                 id="fixed-header-drawer-exp"
          {% if query and query != '' %} value="{{ query }}"{% endif %}>
        </div>
      </form>
      </div>

        <button class="mdl-button mdl-js-button mdl-button--icon responsive-actionbar-button" onclick="location.href='/store/faq'">
       <i class="material-icons">info_outline</i>
      </button>
        <!-- Right aligned menu below button -->
        <button id="demo-menu-lower-right"
                class="mdl-button mdl-js-button mdl-button--icon">
          <i class="material-icons">more_vert</i>
        </button>
        <ul class="mdl-menu mdl-menu--bottom-right mdl-js-menu mdl-js-ripple-effect"
            for="demo-menu-lower-right">

                <label class="mdl-radio mdl-js-radio mdl-js-ripple-effect" for="all" style="margin: 5px;">
                      <input type="radio" form="sort" id="all" class="mdl-radio__button" name="drm" value="all" onchange="this.form.submit()" required
                      {% if not drm or drm == 'all'  %} checked="checked" {% endif %}/>
                      <span class="mdl-radio__label" style="color: black;">All</span>
              </label><br>
                <label class="mdl-radio mdl-js-radio mdl-js-ripple-effect" for="steam"  style="margin: 5px;">
                      <input type="radio" form="sort" id="steam" class="mdl-radio__button" name="drm" value="steam" onchange="this.form.submit()" required
                      {% if drm == 'steam'  %} checked="checked" {% endif %}/>
                      <span class="mdl-radio__label" style="color: black;">Steam</span>
              </label><br>
                <label class="mdl-radio mdl-js-radio mdl-js-ripple-effect" for="origin"  style="margin: 5px;">
                      <input type="radio" form="sort" id="origin" class="mdl-radio__button" name="drm" value="origin" onchange="this.form.submit()" required
                      {% if drm == 'origin'  %} checked="checked" {% endif %}/>
                      <span class="mdl-radio__label" style="color: black;">Origin</span>
              </label><br>
              <label class="mdl-radio mdl-js-radio mdl-js-ripple-effect" for="uplay" style="margin: 5px;">
                      <input type="radio" form="sort" id="uplay" class="mdl-radio__button" name="drm" value="uplay" onchange="this.form.submit()" required
                      {% if drm == 'uplay'  %} checked="checked" {% endif %}/>
                      <span class="mdl-radio__label" style="color: black;">UPlay</span>
              </label>
            </form>
{#          <li class="mdl-menu__item">Some Action</li>#}
{#          <li class="mdl-menu__item">Another Action</li>#}
{#          <li disabled class="mdl-menu__item">Disabled Action</li>#}
{#          <li class="mdl-menu__item">Yet Another Action</li>#}
        </ul>
{#      <nav class="mdl-navigation mdl-layout--large-screen-only">#}
{#          <a class="material-icons md-light" href="/store/faq">info_outline</a>#}
{#        <a class="mdl-navigation__link" href="/store/faq">Privacy Policy/FAQ</a>#}
{#      </nav>#}
    </div>
  </header>
  <div class="mdl-layout__drawer">
    <span class="mdl-layout-title">Tyler's Game Store</span>
    <nav class="mdl-navigation">
          <a class="mdl-navigation__link" href="/"><i class="material-icons nav_drawer_icon" style="display: inline;">home</i>Home</a>
          <a class="mdl-navigation__link" href="/store"><i class="material-icons nav_drawer_icon" style="display: inline;">store</i>Store Home</a>
          <a class="mdl-navigation__link privacy-policy-nav-drawer" href="/store/faq">Privacy Policy & FAQ</a>
    </nav>
  </div>
  <main class="mdl-layout__content"  style="padding-top: 5%;">
    <div class="page-content">
        <div class="mdl-card mdl-shadow--2dp email-card">
            <form id="add_to_list" method="get" action="/store/">
                <div class="mdl-textfield mdl-js-textfield responsive-text-field">
                    <input class="mdl-textfield__input" name="email" type="email" id="email">
                    <label class="mdl-textfield__label" for="sample1">Email</label>
                  </div><br>
                <label class="mdl-radio mdl-js-radio mdl-js-ripple-effect" style="margin: auto 16px auto 16px;" for="subscribe">
                  <input type="radio" id="subscribe" class="mdl-radio__button" name="op" value="add" checked="checked" required/>
                  <span class="mdl-radio__label">Tell me About New Keys</span>
                </label>
            <label class="mdl-radio mdl-js-radio mdl-js-ripple-effect" style="margin: auto 16px auto 16px;" for="unsubscribe">
                  <input type="radio" id="unsubscribe" class="mdl-radio__button" name="op" value="remove" required/>
                  <span class="mdl-radio__label">Don't Tell me About New Keys</span>
                </label>
                {% if email_added %}
                <div class="mdl-card__supporting-text">
                {% if email_op == 'add' %}
                Email successfully added! Thank you!
                {% elif email_op == 'remove' %}
                Email successfully removed! Hope to see you again!
                {% endif %}
              </div>
            {% endif %}
                <div class="mdl-card__actions mdl-card--border" style="margin-top: 45px;">
              <input type="submit"
              style="float:left; margin-bottom: 6px;" class="mdl-button mdl-button--colored mdl-js-button mdl-js-ripple-effect"
              value="Submit"/>
            </div>
            </form>
        </div>
        {% if game_list %}
                {%  for game in game_list %}
                    <div class="mdl-card mdl-shadow--2dp game-card">
                        <div class="mdl-card__title"
                             {% with "game_img/"|add:game.img_location as img %}
                             style="height: 176px; background-image: url({% static img %}); color: #ffffff;
                                 background-size:100% auto; background-repeat: no-repeat;">
                            {% endwith %}
                            <h2 class="mdl-card__title-text game-card--text">{{ game.name }}</h2></div>
                            <div class="drm_icons">
                            {% if game.has_steam %}
                                <div style="float: left; display: inline-block; width: 20%;" class="mdl-card__supporting-text">
                                <img src="{% static "drm_img/steam.png" %}"
                                style="margin: 0 5px;" height="20px" width="20px">Steam</div>
                            {% endif %}
                            {% if game.has_origin %}
                                <div style="float: left; display: inline-block; width: 20%;" class="mdl-card__supporting-text">
                                <img src="{% static "drm_img/origin.png" %}"
                                style="margin: 0 5px;" height="20px" width="20px">Origin</div>
                            {% endif %}
                            {% if game.has_uplay %}
                                <div style="float: left; display: inline-block; width: 20%;" class="mdl-card__supporting-text">
                                <img src="{% static "drm_img/uplay.png" %}"
                                style="margin: 0 5px;" height="20px" width="20px">Uplay</div>
                            {% endif %}
                            </div>
                        <br><br><br>
                        <div class="mdl-card__actions mdl-card--border">
                          <a href="{{ game.id }}"
                          style="float:left;" class="mdl-button mdl-button--colored mdl-js-button mdl-js-ripple-effect">
                            ${{ game.price }} Plus Fees
                          </a>
                        </div>
                    </div>
                {% endfor %}
        {% else %}
            <div class="mdl-card mdl-shadow--2dp game-card">
                 <div class="mdl-card__title">
                     <h2 class="mdl-card__title-text game-card--text">No Keys are Available</h2>
                 </div>
                <div class="mdl-card__supporting-text">
                    Sorry. Please check again soon. I'm thinking about implementing a mailing list and/or notifications for
                    my users on Google Chrome. For now though, you'll have to check back periodically. Sorry again. :(
                </div>
            </div>
        {% endif %}
        </div>
  </main>
</div>

</body><commit_msg>serviceWorker not in navigator<commit_after><!doctype html>
<head>
    {% load staticfiles %}
    <link rel="manifest" href="{% static "manifest/manifest.json" %}"/>
    <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"/>
    <link rel="stylesheet" href="https://code.getmdl.io/1.1.3/material.indigo-pink.min.css" />
    <link rel="stylesheet" href="{% static "styles/styles.css" %}"/>
    <script defer src="https://code.getmdl.io/1.1.1/material.min.js"></script>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="icon" type="image/vnd.microsoft.icon"
     href="{% static "favicon.ico" %}" />
    <title>Available Keys</title>
</head>
<body bgcolor="#DBDBDB">

<!-- Always shows a header, even in smaller screens. -->
<div class="mdl-layout mdl-js-layout mdl-layout--fixed-header">
  <header class="mdl-layout__header">
    <div class="mdl-layout__header-row">
      <!-- Title -->
      <span class="mdl-layout-title responsive-title">Available Games</span>
      <!-- Add spacer, to align navigation to the right -->
      <!-- Navigation. We hide it in small screens. -->
        <div class="mdl-layout-spacer"></div>
      <div class="mdl-textfield mdl-js-textfield mdl-textfield--expandable
                  mdl-textfield--floating-label mdl-textfield--align-right">
      <form id="sort" method="get" action="/store" style="margin-left: 5px;">
        <label class="mdl-button mdl-js-button mdl-button--icon"
               for="fixed-header-drawer-exp">
          <i class="material-icons">search</i>
        </label>
        <div class="mdl-textfield__expandable-holder">
          <input class="mdl-textfield__input" type="text" name="query"
                 id="fixed-header-drawer-exp"
          {% if query and query != '' %} value="{{ query }}"{% endif %}>
        </div>
      </form>
      </div>

        <button class="mdl-button mdl-js-button mdl-button--icon responsive-actionbar-button" onclick="location.href='/store/faq'">
       <i class="material-icons">info_outline</i>
      </button>
        <!-- Right aligned menu below button -->
        <button id="demo-menu-lower-right"
                class="mdl-button mdl-js-button mdl-button--icon">
          <i class="material-icons">more_vert</i>
        </button>
        <ul class="mdl-menu mdl-menu--bottom-right mdl-js-menu mdl-js-ripple-effect"
            for="demo-menu-lower-right">

                <label class="mdl-radio mdl-js-radio mdl-js-ripple-effect" for="all" style="margin: 5px;">
                      <input type="radio" form="sort" id="all" class="mdl-radio__button" name="drm" value="all" onchange="this.form.submit()" required
                      {% if not drm or drm == 'all'  %} checked="checked" {% endif %}/>
                      <span class="mdl-radio__label" style="color: black;">All</span>
              </label><br>
                <label class="mdl-radio mdl-js-radio mdl-js-ripple-effect" for="steam"  style="margin: 5px;">
                      <input type="radio" form="sort" id="steam" class="mdl-radio__button" name="drm" value="steam" onchange="this.form.submit()" required
                      {% if drm == 'steam'  %} checked="checked" {% endif %}/>
                      <span class="mdl-radio__label" style="color: black;">Steam</span>
              </label><br>
                <label class="mdl-radio mdl-js-radio mdl-js-ripple-effect" for="origin"  style="margin: 5px;">
                      <input type="radio" form="sort" id="origin" class="mdl-radio__button" name="drm" value="origin" onchange="this.form.submit()" required
                      {% if drm == 'origin'  %} checked="checked" {% endif %}/>
                      <span class="mdl-radio__label" style="color: black;">Origin</span>
              </label><br>
              <label class="mdl-radio mdl-js-radio mdl-js-ripple-effect" for="uplay" style="margin: 5px;">
                      <input type="radio" form="sort" id="uplay" class="mdl-radio__button" name="drm" value="uplay" onchange="this.form.submit()" required
                      {% if drm == 'uplay'  %} checked="checked" {% endif %}/>
                      <span class="mdl-radio__label" style="color: black;">UPlay</span>
              </label>
            </form>
{#          <li class="mdl-menu__item">Some Action</li>#}
{#          <li class="mdl-menu__item">Another Action</li>#}
{#          <li disabled class="mdl-menu__item">Disabled Action</li>#}
{#          <li class="mdl-menu__item">Yet Another Action</li>#}
        </ul>
{#      <nav class="mdl-navigation mdl-layout--large-screen-only">#}
{#          <a class="material-icons md-light" href="/store/faq">info_outline</a>#}
{#        <a class="mdl-navigation__link" href="/store/faq">Privacy Policy/FAQ</a>#}
{#      </nav>#}
    </div>
  </header>
  <div class="mdl-layout__drawer">
    <span class="mdl-layout-title">Tyler's Game Store</span>
    <nav class="mdl-navigation">
          <a class="mdl-navigation__link" href="/"><i class="material-icons nav_drawer_icon" style="display: inline;">home</i>Home</a>
          <a class="mdl-navigation__link" href="/store"><i class="material-icons nav_drawer_icon" style="display: inline;">store</i>Store Home</a>
          <a class="mdl-navigation__link privacy-policy-nav-drawer" href="/store/faq">Privacy Policy & FAQ</a>
    </nav>
  </div>
  <main class="mdl-layout__content"  style="padding-top: 5%;">
    <div class="page-content">
        <div class="mdl-card mdl-shadow--2dp email-card">
            <form id="add_to_list" method="get" action="/store/">
                <div class="mdl-textfield mdl-js-textfield responsive-text-field">
                    <input class="mdl-textfield__input" name="email" type="email" id="email">
                    <label class="mdl-textfield__label" for="sample1">Email</label>
                  </div><br>
                <label class="mdl-radio mdl-js-radio mdl-js-ripple-effect" style="margin: auto 16px auto 16px;" for="subscribe">
                  <input type="radio" id="subscribe" class="mdl-radio__button" name="op" value="add" checked="checked" required/>
                  <span class="mdl-radio__label">Tell me About New Keys</span>
                </label>
            <label class="mdl-radio mdl-js-radio mdl-js-ripple-effect" style="margin: auto 16px auto 16px;" for="unsubscribe">
                  <input type="radio" id="unsubscribe" class="mdl-radio__button" name="op" value="remove" required/>
                  <span class="mdl-radio__label">Don't Tell me About New Keys</span>
                </label>
                {% if email_added %}
                <div class="mdl-card__supporting-text">
                {% if email_op == 'add' %}
                Email successfully added! Thank you!
                {% elif email_op == 'remove' %}
                Email successfully removed! Hope to see you again!
                {% endif %}
              </div>
            {% endif %}
                <div class="mdl-card__actions mdl-card--border" style="margin-top: 45px;">
              <input type="submit"
              style="float:left; margin-bottom: 6px;" class="mdl-button mdl-button--colored mdl-js-button mdl-js-ripple-effect"
              value="Submit"/>
            </div>
            </form>
        </div>
        {% if game_list %}
                {%  for game in game_list %}
                    <div class="mdl-card mdl-shadow--2dp game-card">
                        <div class="mdl-card__title"
                             {% with "game_img/"|add:game.img_location as img %}
                             style="height: 176px; background-image: url({% static img %}); color: #ffffff;
                                 background-size:100% auto; background-repeat: no-repeat;">
                            {% endwith %}
                            <h2 class="mdl-card__title-text game-card--text">{{ game.name }}</h2></div>
                            <div class="drm_icons">
                            {% if game.has_steam %}
                                <div style="float: left; display: inline-block; width: 20%;" class="mdl-card__supporting-text">
                                <img src="{% static "drm_img/steam.png" %}"
                                style="margin: 0 5px;" height="20px" width="20px">Steam</div>
                            {% endif %}
                            {% if game.has_origin %}
                                <div style="float: left; display: inline-block; width: 20%;" class="mdl-card__supporting-text">
                                <img src="{% static "drm_img/origin.png" %}"
                                style="margin: 0 5px;" height="20px" width="20px">Origin</div>
                            {% endif %}
                            {% if game.has_uplay %}
                                <div style="float: left; display: inline-block; width: 20%;" class="mdl-card__supporting-text">
                                <img src="{% static "drm_img/uplay.png" %}"
                                style="margin: 0 5px;" height="20px" width="20px">Uplay</div>
                            {% endif %}
                            </div>
                        <br><br><br>
                        <div class="mdl-card__actions mdl-card--border">
                          <a href="{{ game.id }}"
                          style="float:left;" class="mdl-button mdl-button--colored mdl-js-button mdl-js-ripple-effect">
                            ${{ game.price }} Plus Fees
                          </a>
                        </div>
                    </div>
                {% endfor %}
        {% else %}
            <div class="mdl-card mdl-shadow--2dp game-card">
                 <div class="mdl-card__title">
                     <h2 class="mdl-card__title-text game-card--text">No Keys are Available</h2>
                 </div>
                <div class="mdl-card__supporting-text">
                    Sorry. Please check again soon. I'm thinking about implementing a mailing list and/or notifications for
                    my users on Google Chrome. For now though, you'll have to check back periodically. Sorry again. :(
                </div>
            </div>
        {% endif %}
        </div>
  </main>
</div>
<script>
if ('serviceWorker' in navigator) {
 console.log('Service Worker is supported');
 navigator.serviceWorker.register('{% static "js/push_notifications.js"%}').then(function(reg) {
   console.log(':^)', reg);
   if ('serviceWorker' in navigator) {
    console.log('Service Worker is supported');
    navigator.serviceWorker.register('{% static "js/push_notifications.js"%}').then(function(reg) {
        console.log(':^)', reg);
        reg.pushManager.subscribe({
            userVisibleOnly: true
        }).then(function(sub) {
            console.log('endpoint:', sub.endpoint);
        });
    }).catch(function(error) {
        console.log(':^(', error);
    });
}
 }).catch(function(err) {
   console.log(':^(', err);
 });
}
</script>
</body>
{'fraction_non_alphanumeric': 0.16312723172336027, 'fraction_numerical': 0.005919939860928397, 'mean_word_length': 1.9509219464855123, 'pattern_counts': {'":': 0, '<': 336, '<?xml version=': 0, '>': 336, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2951476', 'n_tokens_mistral': 6651, 'n_tokens_neox': 6171, 'n_words': 1239}