From 9dafc68ab9463a9de96f7d6c4f4420bfa0aec6b2 Mon Sep 17 00:00:00 2001 From: Stefan Zerkalica Date: Sun, 3 Nov 2024 20:08:31 +0300 Subject: [PATCH] $mol_offline web --- offline/offline.ts | 7 ------- offline/offline.web.ts | 13 +++++++++++++ 2 files changed, 13 insertions(+), 7 deletions(-) create mode 100644 offline/offline.web.ts diff --git a/offline/offline.ts b/offline/offline.ts index c226ea0005..71e2d8aa97 100644 --- a/offline/offline.ts +++ b/offline/offline.ts @@ -5,11 +5,6 @@ namespace $ { '//cse.google.com/adsense/search/async-ads.js' ] - @ $mol_mem - static prompt() { - this.$.$mol_offline_prompt.last()?.prompt() - } - static override blocked( request: Request ) { const normalized_url = request.url.replace( /^https?:/, '' ) @@ -68,8 +63,6 @@ namespace $ { } } - new $mol_after_tick(() => $mol_offline.prompt()) - export namespace $mol_service_plugin { export let $mol_offline = $.$mol_offline } diff --git a/offline/offline.web.ts b/offline/offline.web.ts new file mode 100644 index 0000000000..95182ac4ea --- /dev/null +++ b/offline/offline.web.ts @@ -0,0 +1,13 @@ +namespace $ { + export class $mol_offline_web extends $mol_offline { + @ $mol_mem + static prompt() { + this.$.$mol_offline_prompt.last()?.prompt() + } + } + + $.$mol_offline = $mol_offline_web + $mol_service_plugin.$mol_offline = $.$mol_offline_web + + new $mol_after_tick(() => $mol_offline_web.prompt()) +}