diff --git a/src/abaddon.cpp b/src/abaddon.cpp index c8b294e..ccc9022 100644 --- a/src/abaddon.cpp +++ b/src/abaddon.cpp @@ -177,6 +177,7 @@ static void MainEventHandler(GdkEvent *event, void *main_window) { int Abaddon::StartGTK() { m_gtk_app = Gtk::Application::create("com.github.uowuo.abaddon"); + Glib::set_application_name(APP_TITLE); #ifdef WITH_LIBHANDY m_gtk_app->signal_activate().connect([] { 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> ParseCookie(const Glib::ustri } std::optional 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 matches; // regex->match_all doesnt work for some reason @@ -43,8 +43,8 @@ std::optional 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 {};