40 super(GreaseMonkeyManager, self).__init__(parent) |
43 super(GreaseMonkeyManager, self).__init__(parent) |
41 |
44 |
42 self.__disabledScripts = [] |
45 self.__disabledScripts = [] |
43 self.__scripts = [] |
46 self.__scripts = [] |
44 self.__downloaders = [] |
47 self.__downloaders = [] |
|
48 |
|
49 self.__jsObject = GreaseMonkeyJsObject(self) |
45 |
50 |
46 QTimer.singleShot(0, self.__load) |
51 QTimer.singleShot(0, self.__load) |
47 |
52 |
48 def showConfigurationDialog(self, parent=None): |
53 def showConfigurationDialog(self, parent=None): |
49 """ |
54 """ |
320 if script.fullName() in self.__disabledScripts: |
325 if script.fullName() in self.__disabledScripts: |
321 script.setEnabled(False) |
326 script.setEnabled(False) |
322 else: |
327 else: |
323 collection = WebBrowserWindow.webProfile().scripts() |
328 collection = WebBrowserWindow.webProfile().scripts() |
324 collection.insert(script.webScript()) |
329 collection.insert(script.webScript()) |
|
330 |
|
331 self.__jsObject.setSettingsFile(os.path.join( |
|
332 Utilities.getConfigDir(), "web_browser", |
|
333 "greasemonkey_values.ini")) |
|
334 ExternalJsObject.registerExtraObject("GreaseMonkey", self.__jsObject) |
325 |
335 |
326 def __scriptChanged(self, script): |
336 def __scriptChanged(self, script): |
327 """ |
337 """ |
328 Private slot handling a changed script. |
338 Private slot handling a changed script. |
329 |
339 |