diff --git a/extensions/deepltranslate.cpp b/extensions/deepltranslate.cpp index 3f5e57c..7e917bb 100644 --- a/extensions/deepltranslate.cpp +++ b/extensions/deepltranslate.cpp @@ -130,9 +130,8 @@ std::pair Translate(const std::wstring& text, TranslationPar } // the following code was reverse engineered from the DeepL website; it's as close as I could make it but I'm not sure what parts of this could be removed and still have it work + int id = 10000 * std::uniform_int_distribution(0, 9999)(std::random_device()) + 1; int64_t r = _time64(nullptr), n = std::count(text.begin(), text.end(), L'i') + 1; - thread_local auto generator = std::mt19937(std::random_device()()); - int id = 10000 * std::uniform_int_distribution(0, 9999)(generator) + 1; // user_preferred_langs? what should priority be? does timestamp do anything? other translation quality options? auto body = FormatString(R"( { diff --git a/extensions/devtools.cpp b/extensions/devtools.cpp index e8694bb..6e99f65 100644 --- a/extensions/devtools.cpp +++ b/extensions/devtools.cpp @@ -1,10 +1,10 @@ #include "devtools.h" +#include +#include #include #include #include #include -#include -#include extern const char* CHROME_LOCATION; extern const char* START_DEVTOOLS;