mirror of
https://github.com/celisej567/abaddon.git
synced 2026-09-06 20:15:19 +03:00
Merge branch 'master' into theming
This commit is contained in:
@@ -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([] {
|
||||
|
||||
@@ -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 {};
|
||||
|
||||
Reference in New Issue
Block a user