MCPcopy
hub / github.com/ocsjs/ocsjs / waitForMasteryLevelDialogClose

Function waitForMasteryLevelDialogClose

packages/scripts/src/projects/zhs.ts:1763–1774  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1761 };
1762
1763 const waitForMasteryLevelDialogClose = async () => {
1764 return new Promise<void>((resolve, reject) => {
1765 const check = () => {
1766 if (!document.querySelector('.masterylevel-body')) {
1767 resolve();
1768 } else {
1769 setTimeout(check, 200);
1770 }
1771 };
1772 check();
1773 });
1774 };
1775
1776 const waitForLoad = () => {
1777 return new Promise<void>((resolve, reject) => {

Callers 1

nextFunction · 0.85

Calls 1

checkFunction · 0.70

Tested by

no test coverage detected