用 Ubiquity 发飞信
在我的推友里看到这篇 中国移动飞信 Fetion API 免费发短信的一些应用。文章里面有个 Ubiquity 命令,很简陋,而且还是新建标签式的。

输入在 Ubiquity 里输入 command-editor 或者打开 chrome://ubiquity/content/editor.html,在输入框的末尾输入以下命令。红色部分需要修改。
CmdUtils.CreateCommand({
name: "sms",
takes: {status: noun_arb_text},
homepage: "http://blog.loland.net/2008/09/28/58.et",
author: {name: "sfufoet", homepage: "http://blog.loland.net/"},
license: "MPL",
preview: function(previewBlock, statusText, mods) {
var previewTemplate = '</div><br/>' +
"将要发送到手机的的内容如下: <br/>" +
"<b>${status}</b><br /><br />" +
" 总字数为: <b>${chars}</b>";
if(statusText.text=="me")
statusText.text = "你的手机号&msg=" + context.focusedWindow.getSelection() + " " + context.focusedWindow.location;
else
statusText.text = statusText.text + "&msg=" + context.focusedWindow.getSelection() + " " + context.focusedWindow.location;var previewData = {
status: context.focusedWindow.getSelection() + " " + context.focusedWindow.location,
chars: statusText.text.length
};
var previewHTML = CmdUtils.renderTemplate(previewTemplate,
previewData);
previewBlock.innerHTML = previewHTML;
},
execute: function(statusText) {
jQuery.ajax({
type: "Get",
url: "https://fetionAPI.appspot.com/api/?from=你的手机号&pw=飞信密码&to=" + statusText.text,
error: function() {
displayMessage("发送失败");
},
success: function() {
displayMessage("发送成功");
}
});
}
});
用法:
- 输入 sms 手机号,回车后会把当前选中的文字和当前网址发生到对方手机上。
- 输入 sms me,就会发给自己。
我用的这个飞信 API 是用 Google App Engine 打造的。注意:若短时间内循环大量发送短信者,将直接封号封 IP !
如果不小心被封了,可以试试 中国移动飞信 Fetion API 免费发短信的一些应用 里的另外一个 API。
沙发
@LeON: 太不厚道了,你把沙发抢了还 RT 个啥沙发还空着啊…
@LeON:
太不厚道。我也是被骗过来的……
如果能够实现自定义编辑组群发送就更好了。
前排
不错,但是不是很经常使用命令行,而且这个只能给自己发短信!
@xiao3: 典型的回帖不看贴。
@八百步: 你可以自己修改脚本为群组的发送啊。
哈哈,twitter召唤了sfufoet修改。谢谢了,比我那个粗糙的原始代码强大多了。
我怎么测试的代码不能用,我又改回我那个弱智代码了。可能是我哪里出了问题,要不直接传一个js文件上来?
@daibin: 你先检查一下,我文中标记为红色的地方,你正确修改了没有吧。
顺便提一下,飞信要收费了。。。。。哎呀。。。。。
@roysing: 好像是会员才收费,非会员继续免费。。。