<commit_before>/* global OC, oc_debug */

var _paq = _paq || [];

(function() {
   "use strict";

   var piwik = (typeof localStorage !== 'undefined') ? OC.localStorage.getItem('piwik') : null;

   if (piwik && (piwik.validUntil || 0) > (new Date()).getTime() / 1000 && !oc_debug) {
      track(piwik.siteId, piwik.url);
   } else {
      $.ajax({
            url: OC.filePath('piwik', 'ajax', 'getPiwikSettings.php'),
         })
         .done(function(data) {
            data = data || {};
            piwik = JSON.parse(data.data) || {};

            if (piwik.siteId && piwik.url) {
               piwik.validUntil = (new Date()).getTime() + (piwik.validity * 1000);

               OC.localStorage.setItem('piwik', piwik);

               track(piwik.siteId, piwik.url);
            }
         });
   }

   function track(siteId, url) {
      var app = null;
      var path = window.location.pathname;
      var pathparts = path.match(/index\.php\/apps\/([a-z0-9]+)\/?/i) || path.match(/index\.php\/([a-z0-9]+)(\/([a-z0-9]+))?/i) || [];

      if (pathparts.length >= 2) {
         app = pathparts[1];

         if (app === 's') {
            app = 'share';

            var sharevalue = $('input[name="filename"]').val();

            if(sharevalue) {<commit_msg>Remove OC prefix to work with NextCloud 11.0 (#25)<commit_after>/* global OC, oc_debug */

var _paq = _paq || [];

(function() {
   "use strict";

   var piwik = (typeof localStorage !== 'undefined') ? localStorage.getItem('piwik') : null;

   if (piwik && (piwik.validUntil || 0) > (new Date()).getTime() / 1000 && !oc_debug) {
      track(piwik.siteId, piwik.url);
   } else {
      $.ajax({
            url: OC.filePath('piwik', 'ajax', 'getPiwikSettings.php'),
         })
         .done(function(data) {
            data = data || {};
            piwik = JSON.parse(data.data) || {};

            if (piwik.siteId && piwik.url) {
               piwik.validUntil = (new Date()).getTime() + (piwik.validity * 1000);

               localStorage.setItem('piwik', piwik);

               track(piwik.siteId, piwik.url);
            }
         });
   }

   function track(siteId, url) {
      var app = null;
      var path = window.location.pathname;
      var pathparts = path.match(/index\.php\/apps\/([a-z0-9]+)\/?/i) || path.match(/index\.php\/([a-z0-9]+)(\/([a-z0-9]+))?/i) || [];

      if (pathparts.length >= 2) {
         app = pathparts[1];

         if (app === 's') {
            app = 'share';

            var sharevalue = $('input[name="filename"]').val();

            if(sharevalue) {
{'fraction_non_alphanumeric': 0.20054411193159735, 'fraction_numerical': 0.015157403808783521, 'mean_word_length': 1.9654377880184333, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '3454711', 'n_tokens_mistral': 913, 'n_tokens_neox': 854, 'n_words': 162}