mirror of
https://github.com/Alia5/GlosSI.git
synced 2024-10-30 15:20:38 +00:00
CEFInject: Kill manual scoping of injection and let rollup handle that crap
This commit is contained in:
parent
d60def51d5
commit
a07faa926c
@ -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")) {
|
||||
|
@ -32,6 +32,5 @@ namespace CEFInject
|
||||
bool CEFDebugAvailable(uint16_t port = internal::port_);
|
||||
std::vector<std::wstring> 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_);
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user