<commit_before>// background scripting for Airtab

// function for arbitrary xhr request
function handleReq(options) {
  const xhr = new XMLHttpRequest();
  xhr.onreadystatechange = () => {
    options.callback(xhr);
  };
  xhr.open(options.method, options.url, true);
  xhr.setRequestHeader('Authorization', `Bearer ${options.token}`);
  xhr.send(options.params);
}

// check if an object is empty
function isEmpty(obj) {
  return Object.keys(obj).length === 0;
}

// function to add list to registry
function addList(list) {
  console.log(list);
}

// function to generate list of tabs
function generateTabList() {
  chrome.tabs.query({ pinned: false }, (tabs) => {
    const list = tabs.map(tab => ({ url: tab.url, title: tab.title, favicon: tab.favIconUrl }));
    addList(list);
  });
}

// handler for browser button clicks
chrome.browserAction.onClicked.addHandler(generateTabList);<commit_msg>Remove unnecessary functions<commit_after>// background scripting for Airtab

// function to add list to registry
function addList(list) {
  console.log(list);
}

// function to generate list of tabs
function generateTabList() {
  chrome.tabs.query({ pinned: false }, (tabs) => {
    const list = tabs.map(tab => ({ url: tab.url, title: tab.title, favicon: tab.favIconUrl }));
    addList(list);
  });
}

// handler for browser button clicks
chrome.browserAction.onClicked.addListener(generateTabList);
{'fraction_non_alphanumeric': 0.13898788310762653, 'fraction_numerical': 0.0007127583749109052, 'mean_word_length': 4.318181818181818, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, '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': '564030', 'n_tokens_mistral': 445, 'n_tokens_neox': 433, 'n_words': 116}