Merge branch 'master' into theming

This commit is contained in:
ouwou
2023-12-02 21:53:42 -05:00
2 changed files with 4 additions and 3 deletions

View File

@@ -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([] {

View File

@@ -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 {};