Changeset 21797
- Timestamp:
- 10/21/08 19:27:41 (5 years ago)
- Location:
- lang/javascript/vimperator-plugins/trunk
- Files:
-
- 11 modified
-
autoIgnoreKey.js (modified) (1 diff)
-
direct_bookmark.js (modified) (8 diffs)
-
ldrize_cooperation.js (modified) (11 diffs)
-
ldrize_cooperation_fetch_flv.js (modified) (2 diffs)
-
lookupDictionary.js (modified) (1 diff)
-
matanico.js (modified) (5 diffs)
-
migemo_hint.js (modified) (2 diffs)
-
nicontroller.js (modified) (20 diffs)
-
nnp_cooperation.js (modified) (8 diffs)
-
reading.js (modified) (5 diffs)
-
youtubeamp.js (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/javascript/vimperator-plugins/trunk/autoIgnoreKey.js
r11680 r21797 45 45 function passAllKeysIfTarget() { 46 46 var uri = content.document.documentURI; 47 liberator.mod es.passAllKeys = isMatch(uri);47 liberator.modules.modes.passAllKeys = isMatch(uri); 48 48 //liberator.log('load page: ' + gBrowser.selectedBrowser.contentDocument.URL); 49 49 } -
lang/javascript/vimperator-plugins/trunk/direct_bookmark.js
r19734 r21797 1 1 // Vimperator plugin: 'Direct Post to Social Bookmarks' 2 2 // Version: 0.12 3 // Last Change: 2 2-Sep-2008. Jan 20083 // Last Change: 21-Oct-2008. Jan 2008 4 4 // License: Creative Commons 5 5 // Maintainer: Trapezoid <trapezoid.g@gmail.com> - http://unsigned.g.hatena.ne.jp/Trapezoid … … 397 397 }, 398 398 icon:function(url){ 399 var url = liberator. buffer.URL;399 var url = liberator.modules.buffer.URL; 400 400 var cryptoHash = Cc["@mozilla.org/security/hash;1"].createInstance(Ci.nsICryptoHash); 401 401 cryptoHash.init(Ci.nsICryptoHash.MD5); … … 541 541 return first; 542 542 } 543 liberator. commands.addUserCommand(['btags'],"Update Social Bookmark Tags",543 liberator.modules.commands.addUserCommand(['btags'],"Update Social Bookmark Tags", 544 544 function(arg){setTimeout(function(){getTags().call([])},0)}, {}); 545 liberator. commands.addUserCommand(['bentry'],"Goto Bookmark Entry Page",545 liberator.modules.commands.addUserCommand(['bentry'],"Goto Bookmark Entry Page", 546 546 function(service, special){ 547 547 service = service || useServicesByPost.split(/\s*/)[0]; … … 552 552 liberator.open(currentService.entryPage 553 553 .replace(/%URL(?:::(ESC|MD5))?%/g, function(x, t){ 554 if(!t) return liberator. buffer.URL.replace(/#/, '%23');555 if(t == "ESC") return encodeURIComponent(liberator. buffer.URL);554 if(!t) return liberator.modules.buffer.URL.replace(/#/, '%23'); 555 if(t == "ESC") return encodeURIComponent(liberator.modules.buffer.URL); 556 556 if(t == "MD5"){ 557 var url = liberator. buffer.URL;557 var url = liberator.modules.buffer.URL; 558 558 var cryptoHash = Cc["@mozilla.org/security/hash;1"].createInstance(Ci.nsICryptoHash); 559 559 cryptoHash.init(Ci.nsICryptoHash.MD5); … … 576 576 } 577 577 ); 578 liberator. commands.addUserCommand(['bicon'],"Show Bookmark Count as Icon",578 liberator.modules.commands.addUserCommand(['bicon'],"Show Bookmark Count as Icon", 579 579 function(arg){ 580 var url = getNormalizedPermalink(liberator. buffer.URL);580 var url = getNormalizedPermalink(liberator.modules.buffer.URL); 581 581 var html = useServicesByTag.split(/\s*/).map(function(service){ 582 582 var currentService = services[service] || null; … … 586 586 liberator.echo(html, true); 587 587 }, {}); 588 liberator. commands.addUserCommand(['sbm'],"Post to Social Bookmark",588 liberator.modules.commands.addUserCommand(['sbm'],"Post to Social Bookmark", 589 589 function(arg){ 590 590 var comment = ""; … … 616 616 } 617 617 618 var url = liberator. buffer.URL;619 var title = liberator. buffer.title;618 var url = liberator.modules.buffer.URL; 619 var title = liberator.modules.buffer.title; 620 620 621 621 targetServices.split(/\s*/).forEach(function(service){ … … 641 641 }, 642 642 options: [ 643 [['-s','-service'], liberator. commands.OPTION_STRING],643 [['-s','-service'], liberator.modules.commands.OPTION_STRING], 644 644 ] 645 645 } -
lang/javascript/vimperator-plugins/trunk/ldrize_cooperation.js
r13815 r21797 1 1 // Vimperator plugin: 'Cooperation LDRize Mappings' 2 2 // Version: 0.21 3 // Last Change: 13-Jun-2008. Jan 20083 // Last Change: 21-Oct-2008. Jan 2008 4 4 // License: Creative Commons 5 5 // Maintainer: Trapezoid <trapezoid.g@gmail.com> - http://unsigned.g.hatena.ne.jp/Trapezoid … … 162 162 if(sandbox.window.LDRize != undefined && sandbox.window.Minibuffer != undefined){ 163 163 sandbox.window.addEventListener("focus",function(){ 164 self.LDRize = window.eval("self",sandbox.LDRize.getSiteinfo);165 self.Minibuffer = window.eval("command",sandbox.Minibuffer.addCommand);164 self.LDRize = sandbox.LDRize; 165 self.Minibuffer = sandbox.Minibuffer.command; 166 166 },false); 167 167 if(window.content.wrappedJSObject == sandbox.unsafeWindow){ 168 self.LDRize = window.eval("self",sandbox.LDRize.getSiteinfo);169 self.Minibuffer = window.eval("command",sandbox.Minibuffer.addCommand);168 self.LDRize = sandbox.LDRize; 169 self.Minibuffer = sandbox.Minibuffer.command; 170 170 } 171 171 } … … 175 175 var self = this; 176 176 keys.forEach(function(x){ 177 var map = liberator.m appings.getDefault(null,x) || liberator.mappings.get(null,x);177 var map = liberator.modules.mappings.getDefault(null,x) || liberator.modules.mappings.get(null,x); 178 178 var oldAction = map.action; 179 179 var getter = "getPrev"; … … 198 198 var self = this; 199 199 200 var originalHinttags = liberator. options.hinttags;201 var originalExtendedHinttags = liberator. options.hinttags;200 var originalHinttags = liberator.modules.options.hinttags; 201 var originalExtendedHinttags = liberator.modules.options.hinttags; 202 202 203 203 function setHinttags(enable){ … … 205 205 var siteinfo = self.LDRize.getSiteinfo(); 206 206 if(siteinfo.link && siteinfo.paragraph){ 207 liberator. options.hinttags = siteinfo.paragraph + "/" + siteinfo.link;208 liberator. options.extendedhinttags = siteinfo.paragraph + "/" + siteinfo.link;207 liberator.modules.options.hinttags = siteinfo.paragraph + "/" + siteinfo.link; 208 liberator.modules.options.extendedhinttags = siteinfo.paragraph + "/" + siteinfo.link; 209 209 }else{ 210 liberator. options.hinttags = originalHinttags;211 liberator. options.extendedhinttags = originalExtendedHinttags;210 liberator.modules.options.hinttags = originalHinttags; 211 liberator.modules.options.extendedhinttags = originalExtendedHinttags; 212 212 } 213 213 }else{ 214 liberator. options.hinttags = originalHinttags;215 liberator. options.extendedhinttags = originalExtendedHinttags;214 liberator.modules.options.hinttags = originalHinttags; 215 liberator.modules.options.extendedhinttags = originalExtendedHinttags; 216 216 } 217 217 } … … 219 219 220 220 //Mappings 221 liberator.m appings.addUserMap([liberator.modes.NORMAL], [",f"],221 liberator.modules.mappings.addUserMap([liberator.modules.modes.NORMAL], [",f"], 222 222 "Start QuickHint mode with LDRize", 223 223 function(){ 224 224 setHinttags(true); 225 liberator. hints.show(liberator.modes.QUICK_HINT);225 liberator.modules.hints.show(liberator.modules.modes.QUICK_HINT); 226 226 setHinttags(self.isEnableLDRizeCooperation() && self.isModHints); 227 227 } ,{}); 228 228 229 liberator.m appings.addUserMap([liberator.modes.NORMAL], ["f"],229 liberator.modules.mappings.addUserMap([liberator.modules.modes.NORMAL], ["f"], 230 230 "Start QuickHint mode", 231 231 function(){ 232 232 setHinttags(self.isEnableLDRizeCooperation() && self.isModHints); 233 liberator. hints.show(liberator.modes.QUICK_HINT);233 liberator.modules.hints.show(liberator.modules.modes.QUICK_HINT); 234 234 },{}); 235 235 236 liberator.m appings.addUserMap([liberator.modes.NORMAL], ["F"],236 liberator.modules.mappings.addUserMap([liberator.modules.modes.NORMAL], ["F"], 237 237 "Start QuickHint mode, but open link in a new tab", 238 238 function(){ 239 239 setHinttags(self.isEnableLDRizeCooperation() && self.isModHints); 240 liberator. hints.show(liberator.modes.QUICK_HINT, "t");240 liberator.modules.hints.show(liberator.modules.modes.QUICK_HINT, "t"); 241 241 },{}); 242 242 243 liberator.m appings.addUserMap([liberator.modes.NORMAL], [";"],243 liberator.modules.mappings.addUserMap([liberator.modules.modes.NORMAL], [";"], 244 244 "Start an extended hint mode", 245 245 function(arg){ … … 247 247 248 248 if(arg == "f") 249 liberator. hints.show(liberator.modes.ALWAYS_HINT, "o");249 liberator.modules.hints.show(liberator.modules.modes.ALWAYS_HINT, "o"); 250 250 else if(arg == "F") 251 liberator. hints.show(liberator.modes.ALWAYS_HINT, "t");251 liberator.modules.hints.show(liberator.modules.modes.ALWAYS_HINT, "t"); 252 252 else 253 liberator. hints.show(liberator.modes.EXTENDED_HINT, arg);253 liberator.modules.hints.show(liberator.modules.modes.EXTENDED_HINT, arg); 254 254 }, 255 { flags: liberator. Mappings.flags.ARGUMENT });255 { flags: liberator.modules.Mappings.flags.ARGUMENT }); 256 256 //Commands 257 liberator. commands.addUserCommand(["pin"], "LDRize Pinned Links",257 liberator.modules.commands.addUserCommand(["pin"], "LDRize Pinned Links", 258 258 function(){ 259 259 var links = self.getPinnedItems(); … … 262 262 showString += link + "<br/>"; 263 263 }); 264 liberator. commandline.echo(showString, liberator.commandline.HL_NORMAL, liberator.commandline.FORCE_MULTILINE);264 liberator.modules.commandline.echo(showString, liberator.modules.commandline.HL_NORMAL, liberator.modules.commandline.FORCE_MULTILINE); 265 265 } ,{}); 266 liberator. commands.addUserCommand(["mb","m","minibuffer"], "Execute Minibuffer",266 liberator.modules.commands.addUserCommand(["mb","m","minibuffer"], "Execute Minibuffer", 267 267 function(arg){self.Minibuffer.execute(arg)}, 268 268 { … … 278 278 } 279 279 }); 280 liberator. commands.addUserCommand(["pindownload"], "Download pinned links by any software",280 liberator.modules.commands.addUserCommand(["pindownload"], "Download pinned links by any software", 281 281 function(arg){ self.downloadLinksByProgram(self.getPinnedItems());} ,{}); 282 liberator. commands.addUserCommand(["toggleldrizecooperation","toggleldrc"], "Toggle LDRize Cooperation",282 liberator.modules.commands.addUserCommand(["toggleldrizecooperation","toggleldrc"], "Toggle LDRize Cooperation", 283 283 function(arg){ self.isEnable = !self.isEnable}, {}); 284 284 //Options 285 liberator. options.add(['ldrc','ldrizecooperation'],'LDRize cooperation','boolean',this.isEnable,285 liberator.modules.options.add(['ldrc','ldrizecooperation'],'LDRize cooperation','boolean',this.isEnable, 286 286 { 287 287 setter: function(value){ self.isEnable = value; }, … … 289 289 } 290 290 ); 291 liberator. options.add(['ldrchints'],'mod hinttags for LDRize','boolean',this.isModHints,291 liberator.modules.options.add(['ldrchints'],'mod hinttags for LDRize','boolean',this.isModHints, 292 292 { 293 293 setter: function(value){ self.isModHints = value; }, … … 336 336 if(typeof x.handler == "object"){ 337 337 var args = x.handler[1].map(function(s){ return s.replace(/%URL%/g,url).replace(/%TITLE%/g,title); }); 338 liberator. io.run(x.handler[0],args,false);338 liberator.modules.io.run(x.handler[0],args,false); 339 339 }else if(typeof x.handler == "string"){ 340 liberator. io.run(x.handler,[url],false);340 liberator.modules.io.run(x.handler,[url],false); 341 341 }else if(typeof x.handler == "function"){ 342 342 x.handler(url.toString(),title); -
lang/javascript/vimperator-plugins/trunk/ldrize_cooperation_fetch_flv.js
r8967 r21797 1 1 // Vimperator plugin: 'Cooperation LDRize Mappings - Niconico Flv Fetchearg || liberator.buffer.URLr' 2 2 // Version: 0.4 3 // Last Change: 06-Apr-2008. Jan 20083 // Last Change: 21-Oct-2008. Jan 2008 4 4 // License: Creative Commons 5 5 // Maintainer: Trapezoid <trapezoid.g@gmail.com> - http://unsigned.g.hatena.ne.jp/Trapezoid … … 67 67 xhr.send(null); 68 68 } 69 liberator. commands.addUserCommand(['fetchflv'],'Download flv file from Nicovideo',69 liberator.modules.commands.addUserCommand(['fetchflv'],'Download flv file from Nicovideo', 70 70 function(arg){ 71 httpGET(arg || liberator.buffer.URL,function(responseText){71 httpGET(arg.string || liberator.modules.buffer.URL,function(responseText){ 72 72 var [,title] = responseText.match(/<title>(.*?)<\/title>/i); 73 73 liberator.log(title); 74 NiconicoFlvHandler(arg || liberator.buffer.URL,title);74 NiconicoFlvHandler(arg.string || liberator.modules.buffer.URL,title); 75 75 }); 76 76 },{} -
lang/javascript/vimperator-plugins/trunk/lookupDictionary.js
r21395 r21797 142 142 dictionary.names, 143 143 dictionary.shortHelp, 144 function(arg,special){ 144 function(args,special){ 145 var arg = args.string; 146 145 147 var sel = (window.content.window.getSelection) ? 146 148 window.content.window.getSelection().toString() : null; -
lang/javascript/vimperator-plugins/trunk/matanico.js
r20930 r21797 5 5 * @description-ja 今見てる動画のタイトルとコメントを Twitter に投稿する 6 6 * @author janus_wel <janus_wel@fb3.so-net.ne.jp> 7 * @version 0.6 08 * @minversion 1.17 * @version 0.62 8 * @minversion 2.0pre 2008/10/16 9 9 * ==VimperatorPlugin== 10 10 * … … 90 90 NicoScraper.prototype = { 91 91 constants: { 92 VERSION: '0. 50',92 VERSION: '0.62', 93 93 WATCH_PAGE: 1, 94 94 WATCH_URL: '^http://www\\.nicovideo\\.jp/watch/[a-z]{2}\\d+', … … 118 118 }, 119 119 120 getURL: function() { return liberator. buffer.URL; },120 getURL: function() { return liberator.modules.buffer.URL; }, 121 121 122 122 getSubject: function() { … … 177 177 var scraper = new NicoScraper; 178 178 179 liberator. commands.addUserCommand(['matanico'], "update Twitter's status to current video name and comment",180 function(arg , special) {179 liberator.modules.commands.addUserCommand(['matanico'], "update Twitter's status to current video name and comment", 180 function(args, special) { 181 181 try { 182 var arg = args.string; 183 182 184 // build post string ----- 183 185 var post_string; … … 239 241 // ':matanico!' display the evaluated format. 240 242 if(special) { 241 liberator. util.copyToClipboard(post_string, true);243 liberator.modules.util.copyToClipboard(post_string, true); 242 244 return; 243 245 } -
lang/javascript/vimperator-plugins/trunk/migemo_hint.js
r14136 r21797 1 1 // Vimperator plugin: 'Hint Matching with XUL/Migemo' 2 // Last Change: 16-Jun-2008. Jan 20082 // Last Change: 21-Oct-2008. Jan 2008 3 3 // License: Creative Commons 4 4 // Maintainer: Trapezoid <trapezoid.g@gmail.com> - http://unsigned.g.hatena.ne.jp/Trapezoid … … 20 20 return function(hintString) r.test(hintString); 21 21 } 22 23 plugins = {}; 24 plugins.customHintMatcher = liberator.plugins.customHintMatcher; -
lang/javascript/vimperator-plugins/trunk/nicontroller.js
r20930 r21797 5 5 * @description-ja ニコニコ動画のプレーヤーをキーボードで操作できるようにする。 6 6 * @author janus_wel <janus_wel@fb3.so-net.ne.jp> 7 * @version 0.5 28 * @minversion 1.27 * @version 0.53 8 * @minversion 2.0pre 2008/10/16 9 9 * ==VimperatorPlugin== 10 10 * … … 79 79 // N 秒前にシークする。 80 80 // 指定なしの場合 10 秒前。 81 liberator.m appings.addUserMap(82 [liberator.mod es.NORMAL],81 liberator.modules.mappings.addUserMap( 82 [liberator.modules.modes.NORMAL], 83 83 [',n-'], 84 84 'seek by count backward', … … 87 87 liberator.execute(':nicoseek! ' + '-' + count); 88 88 }, 89 { flags: liberator. Mappings.flags.COUNT }89 { flags: liberator.modules.Mappings.flags.COUNT } 90 90 ); 91 91 … … 93 93 // N 秒後にシークする。 94 94 // 指定なしの場合 10 秒後。 95 liberator.m appings.addUserMap(96 [liberator.mod es.NORMAL],95 liberator.modules.mappings.addUserMap( 96 [liberator.modules.modes.NORMAL], 97 97 [',n+'], 98 98 'seek by count forward', … … 101 101 liberator.execute(':nicoseek! ' + count); 102 102 }, 103 { flags: liberator. Mappings.flags.COUNT }103 { flags: liberator.modules.Mappings.flags.COUNT } 104 104 ); 105 105 EOM … … 187 187 188 188 constants: { 189 VERSION: '0.5 1',189 VERSION: '0.53', 190 190 191 191 CARDINAL_NUMBER: 10, … … 262 262 }, 263 263 264 getURL: function() { return liberator. buffer.URL; },264 getURL: function() { return liberator.modules.buffer.URL; }, 265 265 266 266 _flvplayer: function() { … … 413 413 414 414 // command register 415 liberator. commands.addUserCommand(415 liberator.modules.commands.addUserCommand( 416 416 ['nicoinfo'], 417 417 'display player information', … … 422 422 'controller version : ' + controller.getControllerVersion(), 423 423 ].join("\n"); 424 liberator.echo(info, liberator. commandline.FORCE_MULTILINE);424 liberator.echo(info, liberator.modules.commandline.FORCE_MULTILINE); 425 425 } 426 426 catch(e) { liberator.echoerr(e); } … … 429 429 ); 430 430 431 liberator. commands.addUserCommand(431 liberator.modules.commands.addUserCommand( 432 432 ['nicopause'], 433 433 'toggle play / pause', … … 439 439 ); 440 440 441 liberator. commands.addUserCommand(441 liberator.modules.commands.addUserCommand( 442 442 ['nicomute'], 443 443 'toggle mute', … … 449 449 ); 450 450 451 liberator. commands.addUserCommand(451 liberator.modules.commands.addUserCommand( 452 452 ['nicommentvisible'], 453 453 'toggle comment visible', … … 459 459 ); 460 460 461 liberator. commands.addUserCommand(461 liberator.modules.commands.addUserCommand( 462 462 ['nicorepeat'], 463 463 'toggle repeat', … … 469 469 ); 470 470 471 liberator. commands.addUserCommand(471 liberator.modules.commands.addUserCommand( 472 472 ['nicoseek'], 473 473 'controll seek bar', 474 function(arg, special) { 475 try { special ? controller.seekBy(arg) : controller.seekTo(arg); } 474 function(args, special) { 475 try { 476 var arg = (args.arguments.length > 1) 477 ? args.arguments[0].toString() 478 : args.string; 479 special ? controller.seekBy(arg) : controller.seekTo(arg); 480 } 476 481 catch(e) { liberator.echoerr(e); } 477 482 }, … … 481 486 ); 482 487 483 liberator. commands.addUserCommand(488 liberator.modules.commands.addUserCommand( 484 489 ['nicovolume'], 485 490 'controll volume', 486 function(arg, special) { 487 try { special ? controller.volumeBy(arg) : controller.volumeTo(arg); } 491 function(args, special) { 492 try { 493 var arg = (args.arguments.length > 1) 494 ? args.arguments[0].toString() 495 : args.string; 496 special ? controller.volumeBy(arg) : controller.volumeTo(arg); 497 } 488 498 catch(e) { liberator.echoerr(e); } 489 499 }, … … 493 503 ); 494 504 495 liberator. commands.addUserCommand(505 liberator.modules.commands.addUserCommand( 496 506 ['nicosize'], 497 507 'toggle video size', … … 503 513 ); 504 514 505 liberator. commands.addUserCommand(515 liberator.modules.commands.addUserCommand( 506 516 ['nicodescription'], 507 517 'toggle display or not the description for video', 508 function( arg) {518 function() { 509 519 try { controller.toggleDescription(); } 510 520 catch(e) { liberator.echoerr(e); } … … 513 523 ); 514 524 515 liberator. commands.addUserCommand(525 liberator.modules.commands.addUserCommand( 516 526 ['nicomment'], 517 527 'fill comment box', 518 function(arg ) {528 function(args) { 519 529 try { 530 var arg = args.string; 531 520 532 var command, comment; 521 533 [command, comment] = expandExCommand(arg); … … 535 547 ); 536 548 537 liberator. commands.addUserCommand(549 liberator.modules.commands.addUserCommand( 538 550 ['nicommand'], 539 551 'fill command box', 540 552 function(arg) { 541 try { controller.setValue('inputArea.MailInput.text', arg ); }553 try { controller.setValue('inputArea.MailInput.text', arg.string); } 542 554 catch(e) { liberator.echoerr(e); } 543 555 }, 544 556 { 545 completer: function(arg){ 557 completer: function(args){ 558 var arg = args.string; 559 546 560 // get available commands by roll 547 561 var availableCommands = controller.getAvailableCommands(); … … 593 607 small: 38, 594 608 }; 595 const EMSP = ' ';609 const EMSP = '\u3000'; 596 610 const NBSP = '\u00a0'; 597 611 const LF = '\u000a'; -
lang/javascript/vimperator-plugins/trunk/nnp_cooperation.js
r21342 r21797 6 6 * @author janus_wel <janus_wel@fb3.so-net.ne.jp> 7 7 * @version 0.32 8 * @minversion 1.28 * @minversion 2.0pre 2008/10/16 9 9 * ==VimperatorPlugin== 10 10 * … … 63 63 // N 番目の動画を再生する。 64 64 // 指定なしの場合次の動画が再生される。 65 liberator.m appings.addUserMap(66 [liberator.mod es.NORMAL],65 liberator.modules.mappings.addUserMap( 66 [liberator.modules.modes.NORMAL], 67 67 [',nn'], 68 68 'play next item in NicoNicoPlaylist', … … 71 71 liberator.execute(':nnpplaynext ' + count); 72 72 }, 73 { flags: liberator. Mappings.flags.COUNT }73 { flags: liberator.modules.Mappings.flags.COUNT } 74 74 ); 75 75 … … 77 77 // 上から N 個の動画を削除する。 78 78 // 指定なしの場合一番上の動画が削除される。 79 liberator.m appings.addUserMap(80 [liberator.mod es.NORMAL],79 liberator.modules.mappings.addUserMap( 80 [liberator.modules.modes.NORMAL], 81 81 [',nr'], 82 82 'remove item in NicoNicoPlaylist', … … 86 86 liberator.execute(':nnpgetlist'); 87 87 }, 88 { flags: liberator. Mappings.flags.COUNT }88 { flags: liberator.modules.Mappings.flags.COUNT } 89 89 ); 90 90 … … 144 144 145 145 // scrape from div element that inserted by NicoNicoPlaylist 146 liberator.commands.addUserCommand(['nnpgetlist'], 'get NicoNicoPlaylist', 147 function (arg) { 146 liberator.modules.commands.addUserCommand(['nnpgetlist'], 'get NicoNicoPlaylist', 147 function (args) { 148 var arg = (args.arguments.length > 1) 149 ? args.arguments[0].toString() 150 : args.string; 151 148 152 // check existence of NicoNicoPlaylist 149 153 var playlist = $f('//div[contains(@id, "playlistcontroller_")]'); … … 205 209 .replace(/\$ITEMS/g, items.join('')); 206 210 207 liberator.echo(str, liberator. commandline.FORCE_MULTILINE);211 liberator.echo(str, liberator.modules.commandline.FORCE_MULTILINE); 208 212 },{} 209 213 ); … … 251 255 ].forEach( 252 256 function ([command, description, eventname]){ 253 liberator. commands.addUserCommand(command, description,257 liberator.modules.commands.addUserCommand(command, description, 254 258 function (arg) { 255 259 var r = document.createEvent("CommandEvent"); 256 r.initCommandEvent(eventname, true, true, arg );260 r.initCommandEvent(eventname, true, true, arg.string); 257 261 window.content.dispatchEvent(r); 258 262 },{} -
lang/javascript/vimperator-plugins/trunk/reading.js
r20930 r21797 5 5 * @description-ja 今見てるページの URL とタイトルをコメントといっしょに Twitter に投稿する 6 6 * @author janus_wel <janus_wel@fb3.so-net.ne.jp> 7 * @version 0.2 18 * @minversion 1.27 * @version 0.22 8 * @minversion 2.0pre 2008/10/16 9 9 * ==VimperatorPlugin== 10 10 * … … 57 57 Scraper.prototype = { 58 58 constants: { 59 VERSION: '0.2 1',59 VERSION: '0.22', 60 60 }, 61 61 … … 63 63 64 64 getURL: function() { 65 return liberator. buffer.URL;65 return liberator.modules.buffer.URL; 66 66 }, 67 67 … … 77 77 }; 78 78 79 liberator. commands.addUserCommand(['reading'], "update Twitter's status to current page title, URL and comment",80 function(arg , special) {79 liberator.modules.commands.addUserCommand(['reading'], "update Twitter's status to current page title, URL and comment", 80 function(args, special) { 81 81 try { 82 var arg = args.string; 83 82 84 // build post string ----- 83 85 var post_string; … … 101 103 // ':matanico!' display the evaluated format. 102 104 if(special) { 103 liberator. util.copyToClipboard(post_string, true);105 liberator.modules.util.copyToClipboard(post_string, true); 104 106 return; 105 107 } -
lang/javascript/vimperator-plugins/trunk/youtubeamp.js
r20940 r21797 5 5 * @description-ja YouTube のプレーヤーをキーボードで操作できるようにする。 6 6 * @author janus_wel <janus_wel@fb3.so-net.ne.jp> 7 * @version 0.1 18 * @minversion 1.27 * @version 0.12 8 * @minversion 2.0pre 2008/10/16 9 9 * ==VimperatorPlugin== 10 10 * … … 61 61 62 62 constants: { 63 VERSION: '0.1 0',63 VERSION: '0.12', 64 64 65 65 CARDINAL_NUMBER: 10, … … 103 103 }, 104 104 105 getURL: function() { return liberator. buffer.URL; },105 getURL: function() { return liberator.modules.buffer.URL; }, 106 106 107 107 _player: function() { … … 251 251 252 252 // command register 253 liberator. commands.addUserCommand(253 liberator.modules.commands.addUserCommand( 254 254 ['ytinfo'], 255 255 'display player information', … … 259 259 'controller version : ' + controller.getControllerVersion(), 260 260 ].join('\n'); 261 liberator.echo(info, liberator. commandline.FORCE_MULTILINE);261 liberator.echo(info, liberator.modules.commandline.FORCE_MULTILINE); 262 262 } 263 263 catch(e) { liberator.echoerr(e); } … … 266 266 ); 267 267 268 liberator. commands.addUserCommand(268 liberator.modules.commands.addUserCommand( 269 269 ['ytpause'], 270 270 'toggle play / pause', … … 276 276 ); 277 277 278 liberator. commands.addUserCommand(278 liberator.modules.commands.addUserCommand( 279 279 ['ytmute'], 280 280 'toggle mute', … … 286 286 ); 287 287 288 liberator. commands.addUserCommand(288 liberator.modules.commands.addUserCommand( 289 289 ['ytseek'], 290 290 'control seek bar', 291 function(arg, special) { 292 try { special ? controller.seekBy(arg) : controller.seekTo(arg); } 291 function(args, special) { 292 try { 293 var arg = (args.arguments.length > 1) 294 ? args.arguments[0].toString() 295 : args.string; 296 special ? controller.seekBy(arg) : controller.seekTo(arg); 297 } 293 298 catch(e) { liberator.echoerr(e); } 294 299 }, … … 298 303 ); 299 304 300 liberator. commands.addUserCommand(305 liberator.modules.commands.addUserCommand( 301 306 ['ytvolume'], 302 307 'control volume', 303 function(arg, special) { 304 try { special ? controller.volumeBy(arg) : controller.volumeTo(arg); } 308 function(args, special) { 309 try { 310 var arg = (args.arguments.length > 1) 311 ? args.arguments[0].toString() 312 : args.string; 313 special ? controller.volumeBy(arg) : controller.volumeTo(arg); 314 } 305 315 catch(e) { liberator.echoerr(e); } 306 316 }, … … 310 320 ); 311 321 312 liberator. commands.addUserCommand(322 liberator.modules.commands.addUserCommand( 313 323 ['ytsize'], 314 324 'toggle video size',
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)