| 107 | } |
| 108 | |
| 109 | bool 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 | } |
nothing calls this directly
no test coverage detected