function waitForNode(selector, callback) {
  const interval = setInterval(() => {
    const node = document.querySelector(selector);
    if (node) {
      clearInterval(interval);
      callback(node);
    }
  }, 100);
}
@param {string} selector
@param {Function<Node>} callback