--- Revision None +++ Revision 616361643462 @@ -0,0 +1,24 @@ +" add :twit command +js << EOF +AuPoil = { + addScript: function(path) { + var doc = window.content.document; + var s = doc.createElement('script'); + s.setAttribute('src', 'http://a.pwal.fr'+path); + s.setAttribute('type', 'text/javascript'); + doc.body.appendChild(s); + }, + quickTwit: function(alias) { + var doc = window.content.document; + // var url = "https://twitter.com/home/?status=$t+$u"; + var url = "https://identi.ca//index.php?action=bookmarklet&status_textarea=$t+$u"; + var path = '/json/?callback=apwal.quickPost&alias='+alias+'&arg='+encodeURIComponent(url)+'&url='+encodeURIComponent(doc.location.href) + this.addScript('/_static/api.js') + this.addScript(path) + } +} +EOF +command! -nargs=? pwal :open http://a.pwal.fr/ +command! -nargs=? twit :js AuPoil.quickTwit('') +command! -nargs=? trac :open http://.trac.bearstech.com +command! -nargs=? pypi :open http://pypi.python.org/pypi/