aboutsummaryrefslogtreecommitdiff
path: root/app/src/web/assets/js/document_watcher.ts
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/web/assets/js/document_watcher.ts')
-rw-r--r--app/src/web/assets/js/document_watcher.ts27
1 files changed, 0 insertions, 27 deletions
diff --git a/app/src/web/assets/js/document_watcher.ts b/app/src/web/assets/js/document_watcher.ts
deleted file mode 100644
index e671149c..00000000
--- a/app/src/web/assets/js/document_watcher.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-// Emit key once half the viewport is covered
-(function () {
- const isReady = () => {
- return document.body.scrollHeight > innerHeight + 100
- };
-
- if (isReady()) {
- console.log('Already ready');
- Frost.isReady();
- return
- }
-
- console.log('Injected document watcher');
-
- const observer = new MutationObserver(() => {
- if (isReady()) {
- observer.disconnect();
- Frost.isReady();
- console.log(`Documented surpassed height in ${performance.now()}`);
- }
- });
-
- observer.observe(document, {
- childList: true,
- subtree: true
- })
-}).call(undefined);