diff options
author | Lucian Branescu Mihaila <lucian.branescu@gmail.com> | 2009-07-09 15:15:44 (GMT) |
---|---|---|
committer | Lucian Branescu Mihaila <lucian.branescu@gmail.com> | 2009-07-09 15:15:44 (GMT) |
commit | f15a3d0643073d18d38f41fd968f104099089ee8 (patch) | |
tree | 4423fbd2fbf0136d2ab6ec1c9a826057ae078c8e /webactivity.py | |
parent | 2f882ce28b9872e34450b5e8e5e112bb0aeccb4e (diff) |
Userscript injector works for local and remote websites (google)
Diffstat (limited to 'webactivity.py')
-rw-r--r-- | webactivity.py | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/webactivity.py b/webactivity.py index 957ec43..7e7443c 100644 --- a/webactivity.py +++ b/webactivity.py @@ -560,15 +560,9 @@ class WebActivity(activity.Activity): def _userscript_inject_cb(self, listener, script_path): logging.debug('@@@@@ %s' % script_path) - w = self._browser.dom_window - script = w.document.createElement('script') - script.type = 'text/javascript' - script.src = script_path - - head = w.document.getElementsByTagName('head').item(0) - head.appendChild(script) - + usercode.Injector(script_path).attach(self._browser.dom_window) + def _add_link(self): ''' take screenshot and add link info to the model ''' for link in self.model.data['shared_links']: |