Skip to content

Commit

Permalink
revert google-docs.js to IIFE
Browse files Browse the repository at this point in the history
  • Loading branch information
Casheeew committed Dec 26, 2023
1 parent 0bdccdd commit c70c8a2
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions ext/js/accessibility/google-docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

/** */
async function main() {
(async () => {
// Reentrant check
// @ts-expect-error - Checking a property to the global object
if (self.googleDocsAccessibilitySetup) { return; }
Expand Down Expand Up @@ -72,9 +71,4 @@ async function main() {
script.textContent = `(${inject.toString()})();`;
parent.appendChild(script);
parent.removeChild(script);
}

await main();

// Empty export to enable top level await
export {};
})();

0 comments on commit c70c8a2

Please sign in to comment.