Changeset 13282
- Timestamp:
- 06/05/08 20:06:48 (5 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/javascript/vimperator-plugins/trunk/direct_bookmark.js
r13217 r13282 1 1 // Vimperator plugin: 'Direct Post to Social Bookmarks' 2 // Version: 0. 093 // Last Change: 0 4-Jun-2008. Jan 20082 // Version: 0.10 3 // Last Change: 05-Jun-2008. Jan 2008 4 4 // License: Creative Commons 5 5 // Maintainer: Trapezoid <trapezoid.g@gmail.com> - http://unsigned.g.hatena.ne.jp/Trapezoid … … 44 44 // ':bentry' 45 45 // Goto Bookmark Entry Page 46 // ':bicon'47 // Show Bookmark Count as Icon48 46 (function(){ 49 47 var evalFunc = window.eval; … … 55 53 } 56 54 } 57 } catch(e) { liberator.log('warning: wassr.js is working with unsafe sandbox.'); }55 } catch(e) { liberator.log('warning: direct_bookmark.js is working with unsafe sandbox.'); } 58 56 59 57 var useServicesByPost = liberator.globalVariables.direct_sbm_use_services_by_post || 'hdl'; … … 323 321 loginPrompt:{ user:'', password:'', description:'Enter username and password.' }, 324 322 entryPage:'http://b.hatena.ne.jp/entry/%URL%', 325 poster:function(user,password,url, comment,tags){323 poster:function(user,password,url,title,comment,tags){ 326 324 var tagString = tags.length > 0 ? '[' + tags.join('][') + ']' : ""; 327 325 var request = … … 370 368 loginPrompt:{ user:'', password:'', description:'Enter username and password.' }, 371 369 entryPage:'http://del.icio.us/url/%URL::MD5%', 372 poster:function(user,password,url,comment,tags){ 373 var title = liberator.buffer.title; 370 poster:function(user,password,url,title,comment,tags){ 374 371 var request_url = 'https://api.del.icio.us/v1/posts/add?' + [ 375 372 ['url', url], ['description', title], ['extended', comment], ['tags', tags.join(' ')] … … 419 416 loginPrompt:{ user:'', password:'apikey', description:'Enter username and apikey.\nyou can get "api-key" from\n\thttp://clip.livedoor.com/config/api' }, 420 417 entryPage:'http://clip.livedoor.com/page/%URL%', 421 poster:function(user,password,url,comment,tags){ 422 var title = liberator.buffer.title; 418 poster:function(user,password,url,title,comment,tags){ 423 419 var request_url = 'http://api.clip.livedoor.com/v1/posts/add?' + [ 424 420 ['url', url], ['description', title], ['extended', comment], ['tags', tags.join(' ')] … … 458 454 loginPrompt:null, 459 455 entryPage:'%URL%', 460 poster:function(user,password,url, comment,tags){456 poster:function(user,password,url,title,comment,tags){ 461 457 var request_url = 'http://www.google.com/bookmarks/mark'; 462 458 var params = [ 463 ['bkmk', url], ['title', liberator.buffer.title], ['labels', tags.join(',')]459 ['bkmk', url], ['title', title], ['labels', tags.join(',')] 464 460 ].map(function(p) p[0] + '=' + encodeURIComponent(p[1])).join('&'); 465 461 return Deferred.http({ … … 481 477 loginPrompt:null, 482 478 entryPage:'%URL%', 483 poster:function(user,password,url, comment,tags){479 poster:function(user,password,url,title,comment,tags){ 484 480 const taggingService = Cc["@mozilla.org/browser/tagging-service;1"].getService(Ci.nsITaggingService); 485 481 var nsUrl = Cc["@mozilla.org/network/standard-url;1"].createInstance(Ci.nsIURL); … … 487 483 taggingService.tagURI(nsUrl,tags); 488 484 try{ 489 Application.bookmarks.tags.addBookmark( liberator.buffer.title, nsUrl);485 Application.bookmarks.tags.addBookmark(title, nsUrl); 490 486 }catch(e){ 491 487 throw "Places: faild"; … … 590 586 } 591 587 588 var url = liberator.buffer.URL; 589 var title = liberator.buffer.title; 590 592 591 targetServices.split(/\s*/).forEach(function(service){ 593 592 var user, password, currentService = services[service] || null; … … 595 594 d = d.next(function() currentService.poster( 596 595 user,password, 597 isNormalize ? getNormalizedPermalink( liberator.buffer.URL) : liberator.buffer.URL,596 isNormalize ? getNormalizedPermalink(url) : url,title, 598 597 comment,tags 599 598 ));
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)