aboutsummaryrefslogtreecommitdiffstats
path: root/ldrize_cooperation.js
diff options
context:
space:
mode:
authormattn2008-12-09 01:12:36 +0000
committermattn2008-12-09 01:12:36 +0000
commitf6da6ffdc38824ac9ba5df3f13741808ed6df58a (patch)
tree1b76c3aed70ced2188543621818dcf6ff5c40585 /ldrize_cooperation.js
parent4badc3a64ccc5a239bcb259ef2bbbe773c4899b0 (diff)
downloadvimperator-plugins-f6da6ffdc38824ac9ba5df3f13741808ed6df58a.tar.bz2
ignore error that greasemonkey was disabled.
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@26157 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'ldrize_cooperation.js')
-rw-r--r--ldrize_cooperation.js34
1 files changed, 19 insertions, 15 deletions
diff --git a/ldrize_cooperation.js b/ldrize_cooperation.js
index a15cabe..664ed21 100644
--- a/ldrize_cooperation.js
+++ b/ldrize_cooperation.js
@@ -1,6 +1,6 @@
// Vimperator plugin: 'Cooperation LDRize Mappings'
// Version: 0.23
-// Last Change: 06-Dec-2008. Jan 2008
+// Last Change: 09-Dec-2008. Jan 2008
// License: Creative Commons
// Maintainer: Trapezoid <trapezoid.g@gmail.com> - http://unsigned.g.hatena.ne.jp/Trapezoid
//
@@ -168,20 +168,24 @@
return LDRizeCooperationPanel;
},
hookGreasemonkey: function(){
- var self = this;
- var GreasemonkeyService = Cc["@greasemonkey.mozdev.org/greasemonkey-service;1"].getService().wrappedJSObject;
- this.addAfter(GreasemonkeyService,'evalInSandbox',function(code,codebase,sandbox){
- if(sandbox.window.LDRize != undefined && sandbox.window.Minibuffer != undefined){
- sandbox.window.addEventListener("focus",function(){
- self.LDRize = sandbox.LDRize;
- self.Minibuffer = sandbox.Minibuffer.command;
- },false);
- if(window.content.wrappedJSObject == sandbox.unsafeWindow){
- self.LDRize = sandbox.LDRize;
- self.Minibuffer = sandbox.Minibuffer.command;
+ try{
+ var self = this;
+ var GreasemonkeyService = Cc["@greasemonkey.mozdev.org/greasemonkey-service;1"].getService().wrappedJSObject;
+ this.addAfter(GreasemonkeyService,'evalInSandbox',function(code,codebase,sandbox){
+ if(sandbox.window.LDRize != undefined && sandbox.window.Minibuffer != undefined){
+ sandbox.window.addEventListener("focus",function(){
+ self.LDRize = sandbox.LDRize;
+ self.Minibuffer = sandbox.Minibuffer.command;
+ },false);
+ if(window.content.wrappedJSObject == sandbox.unsafeWindow){
+ self.LDRize = sandbox.LDRize;
+ self.Minibuffer = sandbox.Minibuffer.command;
+ }
}
- }
- });
+ });
+ }catch(e){
+ liberator.log(e);
+ }
},
initLDRizeCaptureKeys: function(keys){
var self = this;
@@ -355,7 +359,7 @@
if(Math.abs(p.top - (scrollY + innerHeight/2)) > limit) return true; // scroll
else return false; // bind
}catch(e){
- log(e);
+ liberator.log(e);
}
},