<commit_before>import {ipcRenderer} from 'electron';

import piwik from 'renderer/services/piwik';
import webView from 'renderer/webview';

/**
 * Forward a message to the webview.
 */
ipcRenderer.on('fwd-webview', function (event, channel, ...args) {
  if (webView.isLoading && (typeof webView.isLoading === 'function') && !webView.isLoading()) {
    webView.send(channel, ...args);
  } else {
    const onLoaded = function () {
      webView.send(channel, ...args);
      webView.removeEventListener('dom-ready', onLoaded);
    };<commit_msg>Fix usage of Piwik in renderer<commit_after>import {ipcRenderer} from 'electron';

import * as piwik from 'renderer/services/piwik';
import webView from 'renderer/webview';

/**
 * Forward a message to the webview.
 */
ipcRenderer.on('fwd-webview', function (event, channel, ...args) {
  if (webView.isLoading && (typeof webView.isLoading === 'function') && !webView.isLoading()) {
    webView.send(channel, ...args);
  } else {
    const onLoaded = function () {
      webView.send(channel, ...args);
      webView.removeEventListener('dom-ready', onLoaded);
    };
{'fraction_non_alphanumeric': 0.16306306306306306, 'fraction_numerical': 0.0, 'mean_word_length': 3.9598214285714284, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2478107', 'n_tokens_mistral': 349, 'n_tokens_neox': 347, 'n_words': 84}