function wait() {
          const frame = document.querySelector('.notion-frame');

          if (frame !== null) {
            (async () => {
              const notionOverlayContainer = document.querySelector('.notion-overlay-container');
              const createSvgContainer = document.createElement('div');
              const svgContainerHtml = await FS.readFile(PATH.resolve(`${__dirname}/icons/eye.svg`));

              createSvgContainer.innerHTML = svgContainerHtml;
              createSvgContainer.setAttribute('style', 'display: none;');
              createSvgContainer.classList.add('admiraldus-truncated-table-titles-rendered-svg');
              notionOverlayContainer.append(createSvgContainer);
            })();
          } else {
            setTimeout(wait, 500);
          }
        }
/**
         * Wait until frame exists to avoid "cannot read property" error.
         */
Wait until frame exists to avoid "cannot read property" error.
Wait until frame exists to avoid " cannot read property " error .
function wait() {
          const frame = document.querySelector('.notion-frame');
          if (frame !== null) {
            (async () => {
              const notionOverlayContainer = document.querySelector('.notion-overlay-container');
              const createSvgContainer = document.createElement('div');
              const svgContainerHtml = await FS.readFile(PATH.resolve(`${__dirname}/icons/eye.svg`));
              createSvgContainer.innerHTML = svgContainerHtml;
              createSvgContainer.setAttribute('style', 'display: none;');
              createSvgContainer.classList.add('admiraldus-truncated-table-titles-rendered-svg');
              notionOverlayContainer.append(createSvgContainer);
            })();
          } else {
            setTimeout(wait, 500);
          }
        }
function wait ( ) { const frame = document . querySelector ( '.notion-frame' ) ; if ( frame !== null ) { ( async ( ) => { const notionOverlayContainer = document . querySelector ( '.notion-overlay-container' ) ; const createSvgContainer = document . createElement ( 'div' ) ; const svgContainerHtml = await FS . readFile ( PATH . resolve ( ` ${ __dirname } ` ) ) ; createSvgContainer . innerHTML = svgContainerHtml ; createSvgContainer . setAttribute ( 'style' , 'display: none;' ) ; createSvgContainer . classList . add ( 'admiraldus-truncated-table-titles-rendered-svg' ) ; notionOverlayContainer . append ( createSvgContainer ) ; } ) ( ) ; } else { setTimeout ( wait , 500 ) ; } }
Wait until frame exists to avoid "cannot read property" error.
Wait until frame exists to avoid " cannot read property " error .