<commit_before>chrome.contextMenus.create({
  id: "qr-coder-selection",
  title: "Generate a QR Code for this selection",
  contexts: ['selection']
});

chrome.contextMenus.create({
  id: "qr-coder-link",
  title: "Generate a QR Code for this link",
  contexts: ['link']
});

chrome.contextMenus.create({
  id: "qr-coder-page",
  title: "Generate a QR Code for this page",
  contexts: ['page']
});

chrome.contextMenus.create({
  id: "qr-coder-image",
  title: "Generate a QR Code for this image",
  contexts: ['image']
});

chrome.contextMenus.create({
  id: "qr-coder-audio",
  title: "Generate a QR Code for this sound",
  contexts: ['audio']
});

chrome.contextMenus.create({
  id: "qr-coder-video",
  title: "Generate a QR Code for this video",
  contexts: ['video']
});

chrome.contextMenus.onClicked.addListener(function (info, tab) {
  switch (info.menuItemId) {
    case "qr-coder-selection":
      chrome.tabs.executeScript(tab.id, { code: "QRCoder.showOverlay('" + info.selectionText + "');" });
      break;
    case "qr-coder-page":
      chrome.tabs.executeScript(tab.id, { code: "QRCoder.showOverlay('" + info.pageUrl + "');" });
      break;
    case "qr-coder-link":
      chrome.tabs.executeScript(tab.id, { code: "QRCoder.showOverlay('" + info.linkUrl + "');" });
      break;
    case "qr-coder-image":
    case "qr-coder-audio":
    case "qr-coder-video":
      chrome.tabs.executeScript(tab.id, { code: "QRCoder.showOverlay('" + info.srcUrl + "');" });
      break;
  }
});<commit_msg>Added base64 encoding for inter-script data exchanging<commit_after>chrome.contextMenus.create({
  id: "qr-coder-selection",
  title: "Generate a QR Code for this selection",
  contexts: ['selection']
});

chrome.contextMenus.create({
  id: "qr-coder-link",
  title: "Generate a QR Code for this link",
  contexts: ['link']
});

chrome.contextMenus.create({
  id: "qr-coder-page",
  title: "Generate a QR Code for this page",
  contexts: ['page']
});

chrome.contextMenus.create({
  id: "qr-coder-image",
  title: "Generate a QR Code for this image",
  contexts: ['image']
});

chrome.contextMenus.create({
  id: "qr-coder-audio",
  title: "Generate a QR Code for this sound",
  contexts: ['audio']
});

chrome.contextMenus.create({
  id: "qr-coder-video",
  title: "Generate a QR Code for this video",
  contexts: ['video']
});

chrome.contextMenus.onClicked.addListener(function (info, tab) {
  switch (info.menuItemId) {
    case "qr-coder-selection":
      chrome.tabs.executeScript(tab.id, { code: "QRCoder.showOverlay('', true);" });
      break;
    case "qr-coder-page":
      chrome.tabs.executeScript(tab.id, { code: "QRCoder.showOverlay('" + window.btoa(info.pageUrl) + "');" });
      break;
    case "qr-coder-link":
      chrome.tabs.executeScript(tab.id, { code: "QRCoder.showOverlay('" + window.btoa(info.linkUrl) + "');" });
      break;
    case "qr-coder-image":
    case "qr-coder-audio":
    case "qr-coder-video":
      chrome.tabs.executeScript(tab.id, { code: "QRCoder.showOverlay('" + window.btoa(info.srcUrl) + "');" });
      break;
  }
});
{'fraction_non_alphanumeric': 0.18217306441119063, 'fraction_numerical': 0.0006506180871828237, 'mean_word_length': 3.7235023041474653, 'pattern_counts': {'":': 12, '<': 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': '4415056', 'n_tokens_mistral': 1143, 'n_tokens_neox': 1103, 'n_words': 236}