<commit_before>NProgress.configure({ showSpinner: false });

var sendNotification = function(title, message, iconUrl) {
  var notification = {
    type:    "basic",
    title:   title,
    message: message,
    iconUrl: iconUrl || "/image/icon_128.png"
  }
  chrome.notifications.create("", notification, function(notificationId){
  });
}

chrome.notifications.onClicked.addListener(function(notificationId){
  webview.executeScript({
    code: "location.href = '" + sentNotifications[notificationId]['userpath'] + "'"
  });
});

var resizeContent = function() {
  var content = document.getElementById('content');
  content.style.width  = (window.document.documentElement.clientWidth  - 16) + 'px'
  content.style.height = (window.document.documentElement.clientHeight - 16) + 'px'
}

var lastCheckedAt = new Date().getTime();
var sentNotifications = {}
var webview = null;

var watchIndex = function() {
  sentNotifications = {}
  console.log('fetch index start');
  NProgress.start();
  webview.executeScript({
    code: "xmlHttp = new XMLHttpRequest(); xmlHttp.open('GET', 'https://www.pplog.net/', false); xmlHttp.send(null); xmlHttp.responseText;"
  }, function(result) {
    console.log('fetch index done');
    NProgress.done();
    var html     = result[0];
    var posts    = $('li.user.post-index', html.replace(/src/g, 'data-src'));
    posts.each(function(){
      var post = $(this);
      var createdAt = post.find('.created-at').text().replace(/年|月/g, '/').replace(/日\(.\)/g, '')<commit_msg>fix notification error<commit_after>NProgress.configure({ showSpinner: false });

var sendNotification = function(title, message, iconUrl) {
  var notification = {
    type:    "basic",
    title:   title,
    message: message,
    iconUrl: iconUrl || "/image/icon_128.png"
  }
  chrome.notifications.create("", notification, function(notificationId){
  });
}

chrome.notifications.onClicked.addListener(function(notificationId){
  notificationInfo = sentNotifications[notificationId];
  if (!notificationInfo) { return; }
  webview.executeScript({
    code: "location.href = '" + notificationInfo['userpath'] + "'"
  });
});

var resizeContent = function() {
  var content = document.getElementById('content');
  content.style.width  = (window.document.documentElement.clientWidth  - 16) + 'px'
  content.style.height = (window.document.documentElement.clientHeight - 16) + 'px'
}

var lastCheckedAt = new Date().getTime();
var sentNotifications = {}
var webview = null;

var watchIndex = function() {
  sentNotifications = {}
  console.log('fetch index start');
  NProgress.start();
  webview.executeScript({
    code: "xmlHttp = new XMLHttpRequest(); xmlHttp.open('GET', 'https://www.pplog.net/', false); xmlHttp.send(null); xmlHttp.responseText;"
  }, function(result) {
    console.log('fetch index done');
    NProgress.done();
    var html     = result[0];
    var posts    = $('li.user.post-index', html.replace(/src/g, 'data-src'));
    posts.each(function(){
      var post = $(this);
      var createdAt = post.find('.created-at').text().replace(/年|月/g, '/').replace(/日\(.\)/g, '')
{'fraction_non_alphanumeric': 0.17166828009035173, 'fraction_numerical': 0.005162955792191029, 'mean_word_length': 4.158069883527454, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 8}, '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': '5127757', 'n_tokens_mistral': 968, 'n_tokens_neox': 945, 'n_words': 185}