<commit_before>const React = require("react");
const { connect } = require("react-redux");
const { getTabs } = require("../selectors");

require("./Tabs.css");
const dom = React.DOM;

function getTabsByBrowser(tabs, browser) {
  return tabs.valueSeq()
    .filter(tab => tab.get("browser") == browser);
}

function renderTabs(tabTitle, tabs, paramName) {
  if (tabs.count() == 0) {
    return null;
  }

  return dom.div(
    { className: `tab-group ${tabTitle}` },
    dom.div(
      { className: "tab-group-title" }, tabTitle),
    dom.ul(
      { className: "tab-list" },
      tabs.valueSeq().map(tab => dom.li(
        { "className": "tab",
          "key": tab.get("id"),
          "onClick": () => {
            window.location = "/?" + paramName + "=" + tab.get("id");
          } },
        dom.div({ className: "tab-title" }, tab.get("title")),
        dom.div({ className: "tab-url" }, tab.get("url"))
      ))
    )
  );
}

function Tabs({ tabs }) {
  const firefoxTabs = getTabsByBrowser(tabs, "firefox");
  const chromeTabs = getTabsByBrowser(tabs, "chrome");

  if (tabs.isEmpty()) {
    return dom.div(
      { className: "not-connected-message" },
      "No remote tabs found. You may be looking to ",
      dom.a({ href: "/?ws=localhost:5858/node" }, "connect to Node"),
      "."
    );
  }

  return dom.div(
    { className: "tabs" },
    renderTabs("Firefox Tabs", firefoxTabs, "firefox-tab"),
    renderTabs("Chrome Tabs", chromeTabs, "chrome-tab"),
    dom.div(
      { className: "node-message" },
      "You can also ",
      dom.a({ href: "/?ws=localhost:9229/node" },
            "connect to Node"),
      "."
    )
  );
}

module.exports = connect(
  state => ({ tabs: getTabs(state) })
)(Tabs);<commit_msg>Fix tabs theme<commit_after>const React = require("react");
const { connect } = require("react-redux");
const { getTabs } = require("../selectors");

require("./Tabs.css");
const dom = React.DOM;

function getTabsByBrowser(tabs, browser) {
  return tabs.valueSeq()
    .filter(tab => tab.get("browser") == browser);
}

function renderTabs(tabTitle, tabs, paramName) {
  if (tabs.count() == 0) {
    return null;
  }

  return dom.div(
    { className: `tab-group ${tabTitle}` },
    dom.div(
      { className: "tab-group-title" }, tabTitle),
    dom.ul(
      { className: "tab-list" },
      tabs.valueSeq().map(tab => dom.li(
        { "className": "tab",
          "key": tab.get("id"),
          "onClick": () => {
            window.location = "/?" + paramName + "=" + tab.get("id");
          } },
        dom.div({ className: "tab-title" }, tab.get("title")),
        dom.div({ className: "tab-url" }, tab.get("url"))
      ))
    )
  );
}

function Tabs({ tabs }) {
  const firefoxTabs = getTabsByBrowser(tabs, "firefox");
  const chromeTabs = getTabsByBrowser(tabs, "chrome");

  if (tabs.isEmpty()) {
    return dom.div(
      { className: "not-connected-message" },
      "No remote tabs found. You may be looking to ",
      dom.a({ href: "/?ws=localhost:5858/node" }, "connect to Node"),
      "."
    );
  }

  return dom.div(
    { className: "tabs theme-light" },
    renderTabs("Firefox Tabs", firefoxTabs, "firefox-tab"),
    renderTabs("Chrome Tabs", chromeTabs, "chrome-tab"),
    dom.div(
      { className: "node-message" },
      "You can also ",
      dom.a({ href: "/?ws=localhost:9229/node" },
            "connect to Node"),
      "."
    )
  );
}

module.exports = connect(
  state => ({ tabs: getTabs(state) })
)(Tabs);
{'fraction_non_alphanumeric': 0.19655667144906744, 'fraction_numerical': 0.005164992826398852, 'mean_word_length': 2.665615141955836, 'pattern_counts': {'":': 6, '<': 3, '<?xml version=': 0, '>': 11, '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': '789015', 'n_tokens_mistral': 1219, 'n_tokens_neox': 1179, 'n_words': 246}