diff --git a/CEFInjectLib/CEFInject.cpp b/CEFInjectLib/CEFInject.cpp index b76dfe9..297e484 100644 --- a/CEFInjectLib/CEFInject.cpp +++ b/CEFInjectLib/CEFInject.cpp @@ -66,13 +66,7 @@ namespace CEFInject return tabs; } - - nlohmann::json InjectJs(const std::wstring& tabname, const std::wstring& js, uint16_t port) - { - return InjectJs_Unscoped(tabname, L"(async function(){\n" + js + L"\n})();", port); - } - - nlohmann::json InjectJs_Unscoped(const std::wstring &tabname, const std::wstring &js, uint16_t port) + nlohmann::json InjectJs(const std::wstring &tabname, const std::wstring &js, uint16_t port) { auto cli = internal::GetHttpClient(port); if (auto res = cli.Get("/json")) { diff --git a/CEFInjectLib/CEFInject.h b/CEFInjectLib/CEFInject.h index 8c85118..fc077f6 100644 --- a/CEFInjectLib/CEFInject.h +++ b/CEFInjectLib/CEFInject.h @@ -32,6 +32,5 @@ namespace CEFInject bool CEFDebugAvailable(uint16_t port = internal::port_); std::vector AvailableTabs(uint16_t port = internal::port_); nlohmann::json InjectJs(const std::wstring& tabname, const std::wstring& js, uint16_t port = internal::port_); - nlohmann::json InjectJs_Unscoped(const std::wstring& tabname, const std::wstring& js, uint16_t port = internal::port_); } \ No newline at end of file