99#include " error_handler.h"
1010#include " res_string_loader.h"
1111#include " script/binding_types.hpp"
12- #include " script /quickjspp.hpp"
12+ #include " breeze-js /quickjspp.hpp"
1313#include " script/script.h"
1414#include " utils.h"
1515
4848
4949#include < Windows.h>
5050
51- #include " qjs_sanitizer.h"
52-
5351#include " logger.h"
5452
5553namespace mb_shell {
@@ -140,8 +138,18 @@ void main() {
140138 if (filename == " explorer.exe" || filename == " 360filebrowser64.exe" || filename == " desktopmgr64.exe" ) {
141139 init_render_global ();
142140 res_string_loader::init ();
143- context_menu_hooks::install_NtUserTrackPopupMenuEx_hook ();
144- fix_win11_menu::install ();
141+ // context_menu_hooks::install_NtUserTrackPopupMenuEx_hook();
142+ // fix_win11_menu::install();
143+ std::thread ([]() {
144+ script_ctx.is_js_ready .wait (false );
145+ spdlog::info (" Is js ready: %d" , script_ctx.is_js_ready .load ());
146+ if (auto res =
147+ script_ctx.eval_string (" globalThis.showConfigPage()" ,
148+ " asan.js" );
149+ !res) {
150+ spdlog::error (" Failed to show config page: {}" , res.error ());
151+ }
152+ }).detach ();
145153 }
146154
147155 if (filename == " onecommander.exe" ) {
@@ -199,10 +207,13 @@ void main() {
199207 init_console (true );
200208 std::thread ([]() {
201209 script_ctx.is_js_ready .wait (false );
202- spdlog::info ( " Is js ready: %d" , script_ctx.is_js_ready .load ());
203- script_ctx.js ->enqueueJob ([]() {
204- script_ctx.js ->eval (" globalThis.showConfigPage()" , " asan.js" );
205- });
210+ spdlog::info (" Is js ready: %d" , script_ctx.is_js_ready .load ());
211+ if (auto res =
212+ script_ctx.eval_string (" globalThis.showConfigPage()" ,
213+ " asan.js" );
214+ !res) {
215+ spdlog::error (" Failed to show config page: {}" , res.error ());
216+ }
206217 }).detach ();
207218 }
208219}
@@ -225,4 +236,4 @@ extern "C" __declspec(dllexport) void func() {
225236 // running without blocking the main thread.
226237 std::this_thread::sleep_for (std::chrono::milliseconds (100 ));
227238 }
228- }
239+ }
0 commit comments