Skip to content

Commit

Permalink
no longer loading dde_init.js
Browse files Browse the repository at this point in the history
  • Loading branch information
cfry committed Oct 30, 2023
1 parent 98c97f7 commit f7e4668
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
13 changes: 10 additions & 3 deletions dde4/dde/build/bundle.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions dde4/dde/doc/release_notes.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@
It is no longer getting data from the dde_init.js file on Dexter.</li>
<li>Doc addition: <b>Ref Man/GPT Interface/Prompt Engineering/Difference Between Text</b>
shows how to easily see the differences between text segments using DDE4's GPT Interface.</li>
<li><b>dde_apps/dde_init.js</b> 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 <b>File menu/load</b>.</li>
</ul>
</details>

Expand Down

0 comments on commit f7e4668

Please sign in to comment.