let last = null;

chrome.runtime.onMessage.addListener( async (msg, sender, sendResponse) => {
  if (msg.type === "RS_MANIFEST_FETCH") {
    last = msg;
    // If popup is open it will query us immediately
    sendResponse();
  }
  if (msg.type === "LAST_FETCH") {
    sendResponse(last);
  }
});
