Skip to content

Commit

Permalink
[load-time-optimization] improve expand-moves
Browse files Browse the repository at this point in the history
We did not really needed libfcs-wrap .

Also see https://www.shlomifish.org/meta/FAQ/site_loads_quickly.xhtml
  • Loading branch information
shlomif committed Jun 14, 2024
1 parent 8702e59 commit 5f47cb3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ card solitaire game, and <a href="#other_games">several related solitaire games<
[% INCLUDE set_up_tabs %]
[% END %]
window.my_web_fc_solve_ui = expand_moves_ui;
expand_moves_ui.set_up(module_wrapper);
expand_moves_ui.set_up(null);
[% IF enable_jquery_ui %]
$( "#output_tabs" ).tabs();
[% END %]
Expand Down
16 changes: 4 additions & 12 deletions fc-solve/site/wml/src/ts/expand-moves-ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,15 @@ import * as s2i from "./s2ints_js";
import * as BaseApi from "./web-fcs-api-base";
import * as base_ui from "./fcs-base-ui";
import * as expander from "./web-fc-solve--expand-moves";
import Module from "./libfcs-wrap";
import * as w from "./find-fc-deal";

let _module_wrapper: w.ModuleWrapper;

export function init_module(cb: (mw: BaseApi.ModuleWrapper) => any): any {
const _my_module = Module({
onRuntimeInitialized: () => {
_my_module.then((result) => {
const module_wrapper =
w.FC_Solve_init_wrappers_with_module(result);
_module_wrapper = module_wrapper;
cb(module_wrapper);
return 0;
});
},
});
const module_wrapper = null;
_module_wrapper = module_wrapper;
cb(module_wrapper);
return;
}

function _create_bmark_obj() {
Expand Down

0 comments on commit 5f47cb3

Please sign in to comment.