Mozilla の新しいUbiquityツールで発見した最も便利なハックは何ですか?
6 に答える
私は数日前にこれを書きました:http://www.appidx.com/ubiq/stackoverflow.html
実行部分は、POSTデータでの実行を拒否します。コードは正しいコードであり、XULコンポーネントのjavascriptを使用して関数のネイティブコードを試してみましたが、同様に実行を拒否します。どんな助けでもいただければ幸いです。一方、プレビューは正常に機能します。
CmdUtils.CreateCommand({
name: "stackoverflow",
author: {name: "Aryeh Goldsmith"},
homepage: "http://www.appidx.com/ubiq/",
icon: "http://stackoverflow.com/favicon.ico",
takes: {search: noun_arb_text},
license: "MPL",
description: "Searches the highlighted text on stackoverflow.",
_version: "52",
preview: function ( pblock, inputObject) {
var query = inputObject.text;
pblock.innerHTML = "Search stackoverflow.com for " + query + "<br/>";
var url = "http://stackoverflow.com/search";
params = {"search-text": query, "hiddenstuff": ''};
jQuery.post( url, params, function( html ) {
var $ = jQuery;
pblock.innerHTML += "<div style='display:none;'>" + html + "</div>";
var ques = $(pblock).find('.summary h3');
var details = $(pblock).find('.summary .excerpt');
var out = "<div style='margin-bottom: 6px;'><b>Previewing the first 5 results:</b></div>";
for (var j = 0; j< ques.size() && j < 5; j++) {
out += "<div style='padding: 5px;'><b>" + ques[j].innerHTML + "</b><br />";
out += details[j].innerHTML + "</div>";
}
pblock.innerHTML = out;
});
},
execute: function( inputObject ) {
var query = inputObject.text;
var url = "http://stackoverflow.com/search";
var params = {
"search-text": query,
hiddenstuff: ""
};
// The following refuses to work... why? I just don't know! AFAIK it's correct.
openUrl(url, params);
},
})
Firefoxをマウスで閉じるよりも速く閉じることができ、隅にある[x]の小さなもの...:-P
私はちょうどこれを書いた:
makeSearchCommand({
name: "stackoverflow-tagsearch",
author: { name: "Jörg W Mittag", email: "JoergWMittag+Ubiquity@GoogleMail.Com"},
license: "MIT X11",
url: "http://Beta.StackOverflow.Com/questions/tagged/{QUERY}",
icon: "http://StackOverflow.Com/favicon.ico",
description: "Searches <a href=\"http://StackOverflow.Com\">StackOverflow.Com</a> for the given tag(s).",
help: "Searches <a href=\"http://StackOverflow.Com\">StackOverflow.Com</a> for the given tag(s).",
preview: function(pBlock, directObj) {
if (directObj.text)
pBlock.innerHtml = "Searches <a href=\"http://StackOverflow.Com\">StackOverflow.Com</a> for " + directObj.text;
else
pBlock.innerHTML = "Searches <a href=\"http://StackOverflow.Com\">StackOverflow.Com</a> for the given tag(s).";
}
});
いいおもちゃ!
ここで、JQuery と Ubiquity を使用してhttp://Beta.StackOverflow.Com/searchに HTTP POST する方法を理解する必要があります...その質問をすることができるサイトがあればいいのに!
「これを翻訳」と「ページを編集」。ホステッド ドメインをサポートしていれば、Google Apps の機能が役立つと思います。
「email it」や「twitter」コマンドをよく使う
私の同僚は、マシンをインストールして以来、マシンに 3 つのブルー スクリーンが表示されました。これが原因であると完全に確信しているわけではありませんが、彼が今日変更したのはそれだけです。私は今のところそれをアンインストールしています(そして彼もそうです)。