WebBrowser/WebBrowserPage.py

changeset 5716
27a7c7064686
parent 5624
cdd346d8858b
child 5736
000ea446ff4b
equal deleted inserted replaced
5715:cbcca230679f 5716:27a7c7064686
86 86
87 # AdBlock 87 # AdBlock
88 if url.scheme() == "abp": 88 if url.scheme() == "abp":
89 if WebBrowserWindow.adBlockManager().addSubscriptionFromUrl(url): 89 if WebBrowserWindow.adBlockManager().addSubscriptionFromUrl(url):
90 return False 90 return False
91
92 # GreaseMonkey
93 if type_ == QWebEnginePage.NavigationTypeLinkClicked and \
94 url.toString().endswith(".user.js"):
95 WebBrowserWindow.greaseMonkeyManager().downloadScript(url)
96 return False
91 97
92 return QWebEnginePage.acceptNavigationRequest(self, url, type_, 98 return QWebEnginePage.acceptNavigationRequest(self, url, type_,
93 isMainFrame) 99 isMainFrame)
94 100
95 @pyqtSlot(QUrl) 101 @pyqtSlot(QUrl)

eric ide

mercurial