WebBrowser/WebBrowserPage.py

branch
maintenance
changeset 5730
6422afc7adc4
parent 5716
27a7c7064686
child 5736
000ea446ff4b
equal deleted inserted replaced
5695:9a71bd9e2e37 5730:6422afc7adc4
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