<commit_before>// Import the APIs we need.
var pageMod = require("page-mod");
var Request = require("request").Request;
var notifications = require("notifications");
var self = require("self"); 
var tabs = require("tabs");
var ss = require("simple-storage");
var workers = new Array();

// require chrome allows us to use XPCOM objects...
var {Cc, Cu, Cr} = require("chrome");
// from XPCOM, use the NSIGlobalHistory2 service...
var historyService = Components.classes["@mozilla.org/browser/nav-history-service;1"] .getService(Components.interfaces.nsIGlobalHistory2)

// this function takes in a string (and optional charset, paseURI) and creates an nsURI object, which is required by historyService.addURI...
function makeURI(aURL, aOriginCharset, aBaseURI) {  
  var ioService = Components.classes["@mozilla.org/network/io-service;1"]  
                  .getService(Components.interfaces.nsIIOService);  
  return ioService.newURI(aURL, aOriginCharset, aBaseURI);  
} 


function detachWorker(worker, workerArray) {
	var index = workerArray.indexOf(worker);
	if(index != -1) {
		workerArray.splice(index, 1);
	}
}
var localStorage = ss.storage;

// these aliases are just for simplicity, so that the code here looks just like background code
// for all of the other browsers...<commit_msg>updating firefox chrome authority acquiring<commit_after>// Import the APIs we need.
var pageMod = require("page-mod");
var Request = require("request").Request;
var notifications = require("notifications");
var self = require("self"); 
var tabs = require("tabs");
var ss = require("simple-storage");
var workers = new Array();

// require chrome allows us to use XPCOM objects...
const {Cc, Ci, Cu, Cr} = require("chrome");
// from XPCOM, use the NSIGlobalHistory2 service...
var historyService = Cc["@mozilla.org/browser/nav-history-service;1"] .getService(Ci.nsIGlobalHistory2)

// this function takes in a string (and optional charset, paseURI) and creates an nsURI object, which is required by historyService.addURI...
function makeURI(aURL, aOriginCharset, aBaseURI) {  
  var ioService = Cc["@mozilla.org/network/io-service;1"]
                  .getService(Ci.nsIIOService);
  return ioService.newURI(aURL, aOriginCharset, aBaseURI);  
} 


function detachWorker(worker, workerArray) {
	var index = workerArray.indexOf(worker);
	if(index != -1) {
		workerArray.splice(index, 1);
	}
}
var localStorage = ss.storage;

// these aliases are just for simplicity, so that the code here looks just like background code
// for all of the other browsers...
{'fraction_non_alphanumeric': 0.12519623233908947, 'fraction_numerical': 0.004709576138147566, 'mean_word_length': 4.469957081545064, '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': '5152010', 'n_tokens_mistral': 781, 'n_tokens_neox': 747, 'n_words': 240}