Changeset 24841 for lang/javascript/vimperator-plugins/branches
- Timestamp:
- 11/25/08 19:15:50 (5 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/javascript/vimperator-plugins/branches/1.2/ldrize_cooperation.js
r24577 r24841 110 110 var _isEnable; 111 111 112 function replaceMap (mode, key, desc, aroundFunc, extra) { 113 let old = liberator.mappings.get(mode, key); 114 let oldAction = old.action; 115 old.description = desc; 116 old.action = function () 117 let (self = this, args = arguments) 118 aroundFunc(function () oldAction.apply(self, args)); 119 } 120 112 121 var LDRizeCooperation = new Class(); 113 122 LDRizeCooperation.prototype = { … … 219 228 220 229 //Mappings 221 liberator.mappings.add UserMap([liberator.modes.NORMAL], [",f"],230 liberator.mappings.add([liberator.modes.NORMAL], [",f"], 222 231 "Start QuickHint mode with LDRize", 223 232 function(){ … … 227 236 } ,{}); 228 237 229 liberator.mappings.addUserMap([liberator.modes.NORMAL], ["f"],238 replaceMap(liberator.modes.NORMAL, "f", 230 239 "Start QuickHint mode", 231 function( ){240 function(f){ 232 241 setHinttags(self.isEnableLDRizeCooperation() && self.isModHints); 233 liberator.hints.show("o");234 } ,{});235 236 liberator.mappings.addUserMap([liberator.modes.NORMAL], ["F"],242 f(); 243 }); 244 245 replaceMap(liberator.modes.NORMAL, "F", 237 246 "Start QuickHint mode, but open link in a new tab", 238 function( ){247 function(f){ 239 248 setHinttags(self.isEnableLDRizeCooperation() && self.isModHints); 240 liberator.hints.show("t");241 } ,{});242 243 liberator.mappings.addUserMap([liberator.modes.NORMAL], [";"],249 f(); 250 }); 251 252 replaceMap(liberator.modes.NORMAL, ";", 244 253 "Start an extended hint mode", 245 function( arg){254 function(f){ 246 255 setHinttags(self.isEnableLDRizeCooperation() && self.isModHints); 247 liberator.hints.show(arg);248 } ,249 { flags: liberator.Mappings.flags.ARGUMENT }); 256 f(); 257 }); 258 250 259 //Commands 251 260 liberator.commands.addUserCommand(["pin"], "LDRize Pinned Links",
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)