{"size": 538, "ext": "js", "max_stars_repo_path": "background.js", "max_stars_repo_name": "vmarkovtsev/web-history-extension", "max_stars_repo_stars_event_min_datetime": "2021-02-11T10:02:03.000Z", "max_stars_repo_stars_event_max_datetime": "2021-02-11T12:02:22.000Z", "max_issues_repo_path": "background.js", "max_issues_repo_name": "vmarkovtsev/web-history-extension", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "background.js", "max_forks_repo_name": "vmarkovtsev/web-history-extension", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 2, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 28.3157894737, "max_line_length": 138, "alphanum_fraction": 0.6412639405}
'use strict';

chrome.storage.sync.get(["apiKey", "projectId"], (items) => {
  firebase.initializeApp(items);
});

chrome.instanceID.getID((instanceID) => {
  chrome.runtime.onMessage.addListener((message, sender, sendResponse) => {
    const time = new Date();
    message.time = time;
    message.origin = instanceID;
    firebase
      .firestore()
      .collection(`${time.getUTCFullYear()}/${time.getUTCMonth() + 1}/${time.getUTCDate()}/${time.getUTCHours()}/${time.getUTCMinutes()}`)
      .add(message);
    return true
  });
});
