<commit_before><!DOCTYPE HTML>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  <meta http-equiv="Content-Security-Policy" content="default-src * data:; style-src * 'unsafe-inline'; script-src * 'unsafe-inline' 'unsafe-eval'">
  <script src="components/loader.js"></script>
  <script src="lib/onsenui/js/onsenui.min.js"></script>

  <link rel="stylesheet" href="components/loader.css">
  <link rel="stylesheet" href="lib/onsenui/css/onsenui.css">
  <link rel="stylesheet" href="lib/onsenui/css/onsen-css-components.css">
  <link rel="stylesheet" href="css/style.css">

  <script>

  document.addEventListener('init', function(event) {

    var page = event.target;

    function getArticles() {

      var articleList = page.querySelector('#article-list');
      var start = articlesList.getElementsByTagName("ons-list-item").length;

      var request = new XMLHttpRequest();

      request.open('POST', 'http://drydenwire.com/api/json-news');
      request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");

      request.onreadystatechange = function () {//
        var DONE = this.DONE || 4;
        if (this.readyState === DONE) {
          json = JSON.parse(request.responseText);
          for (i=0;i<10;i++) {
            var li = document.createElement("ons-list-item");
            li.innerHTML = json[i].title;
            articleList.appendChild(li);
          }
        }
      }
      request.send("startResults=" + start);
    }

    if (page.id === 'home') {
      getArticles();

    }

  });

  </script>
</head>
<body>

  <ons-navigator id="navigator" page="home.html"></ons-navigator>

  <ons-template id="home.html">
    <ons-page id="home">
      <ons-toolbar>
        <div class="center">
          Home
        </div>
      </ons-toolbar>
      <ons-list>
        <ons-lazy-repeat id="article-list"></ons-lazy-repeat>
      </ons-list>
    </ons-page>
  </ons-template>

  <ons-template id="art-1.html">
    <ons-page>
      <ons-toolbar>
        <div class="center">
          Article 1
        </div>
        <div class="left"><commit_msg>Added load more button. Working.<commit_after><!DOCTYPE HTML>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  <meta http-equiv="Content-Security-Policy" content="default-src * data:; style-src * 'unsafe-inline'; script-src * 'unsafe-inline' 'unsafe-eval'">
  <script src="components/loader.js"></script>
  <script src="lib/onsenui/js/onsenui.min.js"></script>

  <link rel="stylesheet" href="components/loader.css">
  <link rel="stylesheet" href="lib/onsenui/css/onsenui.css">
  <link rel="stylesheet" href="lib/onsenui/css/onsen-css-components.css">
  <link rel="stylesheet" href="css/style.css">

  <script>

  document.addEventListener('init', function(event) {

    var page = event.target;

    function getArticles() {

      var articlesList = page.querySelector('#article-list');
      var start = articlesList.getElementsByTagName("ons-list-item").length;

      var request = new XMLHttpRequest();

      request.open('POST', 'http://drydenwire.com/api/json-news');
      request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");

      request.onreadystatechange = function () {//
        var DONE = this.DONE || 4;
        if (this.readyState === DONE) {
          json = JSON.parse(request.responseText);
          for (i=0;i<10;i++) {
            var li = document.createElement("ons-list-item");
            li.innerHTML = json[i].title;
            articlesList.appendChild(li);
          }
        }
      }
      request.send("startResults=" + start);
    }

    if (page.id === 'home') {
      getArticles();
      page.querySelector('#articles-load').onclick = function() {
        getArticles();
      };
    }

  });

  </script>
</head>
<body>

  <ons-navigator id="navigator" page="home.html"></ons-navigator>

  <ons-template id="home.html">
    <ons-page id="home">
      <ons-toolbar>
        <div class="center">
          Home
        </div>
      </ons-toolbar>
      <ons-list id="article-list">
      </ons-list>
      <ons-button modifier="large--cta" id="articles-load">Load More</ons-button>
    </ons-page>
  </ons-template>

  <ons-template id="art-1.html">
    <ons-page>
      <ons-toolbar>
        <div class="center">
          Article 1
        </div>
        <div class="left">
{'fraction_non_alphanumeric': 0.17727674624226347, 'fraction_numerical': 0.003978779840848806, 'mean_word_length': 2.818565400843882, 'pattern_counts': {'":': 0, '<': 81, '<?xml version=': 0, '>': 79, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '4068135', 'n_tokens_mistral': 1503, 'n_tokens_neox': 1447, 'n_words': 243}