Show
Ignore:
Timestamp:
11/27/08 02:00:59 (6 weeks ago)
Author:
arccosine
Message:

1.id:suVeneがつけてくれたPost完了後のメッセージ表示の復活
2.id:guyonが作成した*によるLDCのレート表示機能の追記
どうみてもコピペです。本当に(ry

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/javascript/vimperator-plugins/trunk/direct_bookmark.js

    r24976 r25004  
    11// Vimperator plugin: 'Direct Post to Social Bookmarks' 
    22// Version: 0.12 
    3 // Last Change: 25-Nov-2008. Jan 2008 
     3// Last Change: 27-Nov-2008. Jan 2008 
    44// License: Creative Commons 
    55// Maintainer: Trapezoid <trapezoid.g@gmail.com> - http://unsigned.g.hatena.ne.jp/Trapezoid 
     
    421421            entryPage:'http://clip.livedoor.com/page/%URL%', 
    422422            poster:function(user,password,url,title,comment,tags){ 
     423                var rate=0; 
     424                var starFullRate=5; 
     425                if(comment.match(/\*+$/)){ 
     426                    comment = RegExp.leftContext; 
     427                    rate = (RegExp.lastMatch.length > starFullRate)? starFullRate : RegExp.lastMatch.length; 
     428                } 
    423429                var request_url = 'http://api.clip.livedoor.com/v1/posts/add?' + [ 
    424                     ['url', url], ['description', title], ['extended', comment], ['tags', tags.join(' ')] 
     430                    ['url', url], ['description', title], ['extended', comment], ['rate', rate], ['tags', tags.join(' ')] 
    425431                ].map(function(p) p[0] + '=' + encodeURIComponent(p[1])).join('&'); 
    426432                return Deferred.http({ 
     
    628634                    isNormalize ? getNormalizedPermalink(url) : url,title, 
    629635                    comment,tags 
    630                 )); 
     636                //)); 
     637                )).next(function(){ 
     638                    liberator.echo("[" + services[service].description + "] post completed."); 
     639                }); 
    631640            }); 
    632641            d.error(function(e){liberator.echoerr("direct_bookmark.js: Exception throwed! " + e);liberator.log(e);});