Changeset 38133
- Timestamp:
- 08/02/10 22:55:03 (3 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/javascript/vimperator-plugins/trunk/twittperator.js
r38132 r38133 1339 1339 }); 1340 1340 } // }}} 1341 function openLink(text) { // {{{ 1342 // TODO 複数のリンクに対応 1343 let m = text.match(/https?:\/\/\S+/); 1344 if (m) 1345 liberator.open(m[0], liberator.NEW_TAB); 1346 } // }}} 1341 1347 function ReTweet(id) { // {{{ 1342 1348 let url = "http://api.twitter.com/1/statuses/retweet/" + id + ".json"; … … 1388 1394 1389 1395 const Completers = { 1390 name _text: function (context, args) {1396 name: function (context, args) { 1391 1397 context.title = ["Name","Entry"]; 1392 1398 context.completions = 1393 1399 history.map(rt(function(s) ["@" + s.user.screen_name, s])); 1394 1400 }, 1395 name_id_text: function (context, args) { 1401 link: function (context, args) { 1402 context.title = ["Name","Entry"]; 1403 context.completions = 1404 history.filter(function (s) /https?:\/\//(s.text)).map(rt(function(s) [s.text, s])); 1405 }, 1406 text: function (context, args) { 1407 context.title = ["Name","Entry"]; 1408 context.completions = 1409 history.map(rt(function(s) [s.text, s])); 1410 }, 1411 name_id: function (context, args) { 1396 1412 context.title = ["Name","Entry"]; 1397 1413 context.completions = … … 1433 1449 description: "Show mentions", 1434 1450 action: function (args) showTwitterMentions(args.literalArg), 1435 completer: Completers.name _text1451 completer: Completers.name 1436 1452 }, 1437 1453 { … … 1440 1456 description: "Twitter search", 1441 1457 action: function (args) showTwitterSearchResult(args.literalArg), 1442 completer: Completers.name_text 1458 completer: Completers.text 1459 }, 1460 { 1461 match: function (s) s.match(/^\//), 1462 command: "/", 1463 description: "Open link", 1464 action: function (args) openLink(args.literalArg), 1465 completer: Completers.link 1443 1466 } 1444 1467 ];
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)