Changeset 2399

Show
Ignore:
Timestamp:
11/29/07 06:37:34
Author:
miyagawa
Message:

add Save & Subscribe

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sbm-xpost/trunk/sbm-xpost.cgi

    r2005 r2399  
    4141</table> 
    4242<input type="submit" value=" Save " /> 
     43<input type="submit name="subscribe" value=" Save and Subscribe " /> 
    4344</form> 
    4445<div><a href="javascript:location.href='[% q.url %]?url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)">bookmarklet</a></div> 
     
    5253    post_delicious($q); 
    5354    post_hatena($q); 
    54     my $url = URI->new("http://www.google.com/url"); 
    55     $url->query_form(sa => 'D', q => $q->param('url')); 
     55 
     56    my $url; 
     57    if ($q->param('subscribe')) { 
     58        $url = URI->new("http://reader.livedoor.com/subscribe/" . $q->param('url')); 
     59    } else { 
     60        $url = URI->new("http://www.google.com/url"); 
     61        $url->query_form(sa => 'D', "q" => $q->param('url')) 
     62    } 
    5663    print $q->redirect($url); 
    5764}