From f7e46681e1f80047fb6ad962be6412814af8f929 Mon Sep 17 00:00:00 2001 From: cfry Date: Mon, 30 Oct 2023 15:51:50 -0400 Subject: [PATCH] no longer loading dde_init.js --- dde4/dde/build/bundle.mjs | 13 ++++++++++--- dde4/dde/doc/release_notes.html | 3 +++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/dde4/dde/build/bundle.mjs b/dde4/dde/build/bundle.mjs index 0952e41..ae50ed7 100644 --- a/dde4/dde/build/bundle.mjs +++ b/dde4/dde/build/bundle.mjs @@ -666984,7 +666984,7 @@ window_modify_id.onclick=function(){Editor.insert( } } }); - DDE_DB.init(on_ready_after_db_init); + DDE_DB.init(on_ready_after_db_init); //persistent_initialize() //now performed by DDE_DB.init //called before loading dde_init.js by design. //Metrics.init() //now performed by DDE_DB.init @@ -667048,8 +667048,15 @@ window_modify_id.onclick=function(){Editor.insert( //will error using gitub.io platform, so for now don't call it. // if (!globalThis.dde_running_in_cloud()) { - await DDE_DB.dde_init_dot_js_initialize();//must occcur after persistent_initialize - // } + + //dde_init_dot_js_initialize can't work because it has to load a file without + //user explicit permission which browser won't allow. + //The workaround is that user manually loads the file every time they + //launch dde4. + // todo But I can shove code into IndexDB from the user and that is loaded when DDE4 is launched. + // await DDE_DB.dde_init_dot_js_initialize()//must occur after persistent_initialize + // + //use await because dde_init_dot_js_initialize has to await for getting the //dde_init.js file which *might* contain a def for dexter0. //if so, then Dexter.dexter0 will be defined and there won't be a redef of it below diff --git a/dde4/dde/doc/release_notes.html b/dde4/dde/doc/release_notes.html index 76b080e..c57a2a9 100644 --- a/dde4/dde/doc/release_notes.html +++ b/dde4/dde/doc/release_notes.html @@ -43,6 +43,9 @@ It is no longer getting data from the dde_init.js file on Dexter.
  • Doc addition: Ref Man/GPT Interface/Prompt Engineering/Difference Between Text shows how to easily see the differences between text segments using DDE4's GPT Interface.
  • +
  • dde_apps/dde_init.js is no longer being loaded when DDE4 launches. + This is because of the security restriction in browsers. Workaround for now: + manually load your dde_init.js file after you launch DDE4 using File menu/load.