Add some debug logging for GreaseMonkey with QtWebKit
This commit is contained in:
parent
df624944f9
commit
6933bc05b4
@ -96,6 +96,8 @@ class BrowserPage(QWebPage):
|
|||||||
Connect the signals used as triggers for injecting user
|
Connect the signals used as triggers for injecting user
|
||||||
javascripts into the passed QWebFrame.
|
javascripts into the passed QWebFrame.
|
||||||
"""
|
"""
|
||||||
|
log.greasemonkey.debug("Connecting to frame {} ({})"
|
||||||
|
.format(frame, frame.url().toDisplayString()))
|
||||||
frame.loadFinished.connect(
|
frame.loadFinished.connect(
|
||||||
functools.partial(self.inject_userjs, frame))
|
functools.partial(self.inject_userjs, frame))
|
||||||
|
|
||||||
@ -306,6 +308,9 @@ class BrowserPage(QWebPage):
|
|||||||
if url.isEmpty():
|
if url.isEmpty():
|
||||||
url = frame.requestedUrl()
|
url = frame.requestedUrl()
|
||||||
|
|
||||||
|
log.greasemonkey.debug("inject_userjs called for {} ({})"
|
||||||
|
.format(frame, url.toDisplayString()))
|
||||||
|
|
||||||
greasemonkey = objreg.get('greasemonkey')
|
greasemonkey = objreg.get('greasemonkey')
|
||||||
scripts = greasemonkey.scripts_for(url)
|
scripts = greasemonkey.scripts_for(url)
|
||||||
# QtWebKit has trouble providing us with signals representing
|
# QtWebKit has trouble providing us with signals representing
|
||||||
|
Loading…
Reference in New Issue
Block a user