Greasemonkey: Lift greasemonkey init app.py
To prepare for multiple-backend support.
This commit is contained in:
parent
25f626a436
commit
be9f8bd0de
@ -64,7 +64,7 @@ from qutebrowser.completion.models import miscmodels
|
||||
from qutebrowser.commands import cmdutils, runners, cmdexc
|
||||
from qutebrowser.config import config, websettings, configfiles, configinit
|
||||
from qutebrowser.browser import (urlmarks, adblock, history, browsertab,
|
||||
downloads)
|
||||
downloads, greasemonkey)
|
||||
from qutebrowser.browser.network import proxy
|
||||
from qutebrowser.browser.webkit import cookies, cache
|
||||
from qutebrowser.browser.webkit.network import networkmanager
|
||||
@ -491,6 +491,10 @@ def _init_modules(args, crash_handler):
|
||||
diskcache = cache.DiskCache(standarddir.cache(), parent=qApp)
|
||||
objreg.register('cache', diskcache)
|
||||
|
||||
log.init.debug("Initializing Greasemonkey...")
|
||||
gm_manager = greasemonkey.GreasemonkeyManager()
|
||||
objreg.register('greasemonkey', gm_manager)
|
||||
|
||||
log.init.debug("Misc initialization...")
|
||||
macros.init()
|
||||
# Init backend-specific stuff
|
||||
|
@ -31,7 +31,7 @@ from qutebrowser.keyinput import modeman
|
||||
from qutebrowser.config import config
|
||||
from qutebrowser.utils import utils, objreg, usertypes, log, qtutils
|
||||
from qutebrowser.misc import miscwidgets, objects
|
||||
from qutebrowser.browser import mouse, hints, greasemonkey
|
||||
from qutebrowser.browser import mouse, hints
|
||||
|
||||
|
||||
tab_id_gen = itertools.count(0)
|
||||
@ -64,10 +64,6 @@ def init():
|
||||
from qutebrowser.browser.webengine import webenginetab
|
||||
webenginetab.init()
|
||||
|
||||
log.init.debug("Initializing Greasemonkey...")
|
||||
gm_manager = greasemonkey.GreasemonkeyManager()
|
||||
objreg.register('greasemonkey', gm_manager)
|
||||
|
||||
|
||||
class WebTabError(Exception):
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user