MCPcopy Create free account
hub / github.com/KDE/falkon / acceptNavigationRequest

Method acceptNavigationRequest

src/plugins/GreaseMonkey/gm_plugin.cpp:109–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107}
108
109bool GM_Plugin::acceptNavigationRequest(WebPage *page, const QUrl &url, QWebEnginePage::NavigationType type, bool isMainFrame)
110{
111 Q_UNUSED(page)
112 Q_UNUSED(isMainFrame)
113
114 bool navigationType = type == QWebEnginePage::NavigationTypeLinkClicked;
115
116 if (navigationType && url.fileName().endsWith(QLatin1String(".user.js"))) {
117 m_manager->downloadScript(url);
118 }
119 return true;
120}

Callers

nothing calls this directly

Calls 2

downloadScriptMethod · 0.80
fileNameMethod · 0.45

Tested by

no test coverage detected