Changeset 37992

Show
Ignore:
Timestamp:
07/21/10 10:07:06 (3 years ago)
Author:
NeoCat
Message:

add geolocation support

Location:
websites/twicli
Files:
1 added
2 modified

Legend:

Unmodified
Added
Removed
  • websites/twicli/plugins/regexp.js

    r37844 r37992  
    55// 発言(JSON)が指定条件にマッチするか判定 
    66function execRegexp(tw, exp) { 
    7         var source = "\nfrom " + tw.source.replace(/<.*?>/g,''); 
     7        var source = "\nvia " + tw.source.replace(/<.*?>/g,''); 
    88        return  (!exp.id     || tw.user.screen_name.match(exp.id  )) && 
    99                (!exp.id_n   ||!tw.user.screen_name.match(exp.id_n)) && 
  • websites/twicli/twicli.js

    r37892 r37992  
    239239if (!(cookieVer>7)) pluginstr+="\ntranslate.js\nscroll.js"; 
    240240if (!(cookieVer>8)) pluginstr+="\nthumbnail.js"; 
    241 if (!(cookieVer>9)) pluginstr=" worldcup-2010.js\n" + pluginstr.substr(1); 
     241//if (!(cookieVer>9)) pluginstr=" worldcup-2010.js\n" + pluginstr.substr(1); 
     242if (!(cookieVer>10)) pluginstr = pluginstr.replace(/worldcup-2010.js\n/,''); 
     243if (!(cookieVer>10)) pluginstr+="\ngeomap.js"; 
    242244pluginstr = pluginstr.substr(1); 
    243245var plugins = new Array; 
     
    593595                //クライアント 
    594596                (tw.source ? '<span class="separator"> / </span><span class="source">' + tw.source.replace(/<a /,'<a target="twitter"') + '</span>' : '') + '</span>' + 
     597                //Geolocation 
     598                (tw.geo && tw.geo.type == 'Point' ? '<a class="button geomap" id="geomap-' + tw.id + '" target="_blank" href="http://maps.google.com?q=' + tw.geo.coordinates.join(',') + '"><img src="images/marker.png" alt="geolocation" title="' + tw.geo.coordinates.join(',') + '"></a>' : '') + 
    595599                //返信先を設定 
    596600                ' <a class="button" href="javascript:replyTo(\'' + un + "'," + tw.id + ')"><img src="images/reply.png" alt="↩" width="14" height="14"></a>' + 
     
    11171121        decr_enter = frm.decr_enter.checked; 
    11181122        resetUpdateTimer(); 
    1119         writeCookie('ver', 10, 3652); 
     1123        writeCookie('ver', 11, 3652); 
    11201124        writeCookie('limit', nr_limit, 3652); 
    11211125        writeCookie('max_count', max_count, 3652);