add greasemonkey support

This commit is contained in:
2026-10-16 00:11:22 +02:00
parent b6020a4354
commit 7bc669225a
8 changed files with 536 additions and 3 deletions
+4
View File
@@ -3,6 +3,7 @@
#include "adblock.h"
#include "commandline.h"
#include "completionview.h"
#include "greasemonkey.h"
#include "hints.h"
#include "history.h"
#include "statusbar.h"
@@ -61,6 +62,7 @@ BrowserWindow::BrowserWindow(const Session &session, const QUrl &startUrl, QWidg
connect(m_commandLine, &QLineEdit::textEdited, this, &BrowserWindow::updateCompletion);
connect(m_commandLine, &CommandLine::completionCycled, this, &BrowserWindow::cycleCompletion);
connect(m_session.adBlocker, &AdBlocker::message, m_status, &StatusBar::showMessage);
connect(m_session.greasemonkey, &Greasemonkey::message, m_status, &StatusBar::showMessage);
qApp->installEventFilter(this);
@@ -473,6 +475,8 @@ void BrowserWindow::runCommand(const QString &command)
} else {
m_status->showMessage(QStringLiteral("Could not clear history"), true);
}
} else if (name == QLatin1String("greasemonkey-reload")) {
m_session.greasemonkey->reload();
} else if (name == QLatin1String("adblock-update")) {
m_session.adBlocker->update();
} else if (name == QLatin1String("adblock-toggle")) {