diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/startup.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/startup.cpp b/src/startup.cpp index 1bfd9a4..b6d09a3 100644 --- a/src/startup.cpp +++ b/src/startup.cpp @@ -29,7 +29,7 @@ std::optional<std::pair<std::string, std::string>> ParseCookie(const Glib::ustri } std::optional<Glib::ustring> GetJavascriptFileFromAppPage(const Glib::ustring &contents) { - auto regex = Glib::Regex::create(R"(/assets/\w{20}.js)"); + auto regex = Glib::Regex::create(R"(/assets/\w+\.?\w{20}\.js)"); std::vector<Glib::ustring> matches; // regex->match_all doesnt work for some reason @@ -43,8 +43,8 @@ std::optional<Glib::ustring> GetJavascriptFileFromAppPage(const Glib::ustring &c start_position += str.size(); } - if (matches.size() >= 2) { - return matches[matches.size() - 2]; + if (matches.size() >= 10) { + return matches[matches.size() - 10]; } return {}; |