无处不在的哈克----------------------------------------
时间:2020-03-05 18:44:06 来源:igfitidea点击:
我们为Mozilla的新Ubiquity工具发现的最有用的黑客是什么?
解决方案
回答
它可以比用鼠标和角落里的[x]小东西更快地关闭Firefox::-P
回答
自安装以来,我的同事的机器上已出现3个蓝屏。不能完全相信这是做什么的,但这是他今天唯一改变的事情。我现在正在卸载它(他也是)。
回答
"翻译"和"编辑页面"。我认为如果Google Apps功能支持托管域,我会发现它们很有用。
回答
我只是这样写:
makeSearchCommand({ name: "stackoverflow-tagsearch", author: { name: "J?rg W Mittag", email: "[email protected]"}, 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 POST到http://Beta.StackOverflow.Com/search ...如果只有一个网站可以问这个问题!
回答
我是几天前写的: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); }, })
回答
我经常使用"用电子邮件发送"和"推特"命令