I have this UserScript for Grease monkey. but I can't get the onleydown event to fire in FIREFOX only. I've looked everywhere!
- // ==UserScript==
-
// @name iGoogle Suggest
-
// @namespace Devin Samarin
-
// @description This automatcally selects the top result for your query.
-
// @include *google.com/ig*
-
// ==/UserScript==
-
function makeRequest() {
-
GM_xmlhttpRequest({
-
method: 'GET',
-
url: 'http://suggestqueries.google.com/complete/search?output=firefox&client=firefox&qu='+encodeURI(document.getElementById('q').value),
-
headers: {
-
'User-agent': 'Mozilla/4.0 (compatible) Greasemonkey/0.3',
-
},
-
onload: function(responseDetails) {
-
-
var response = responseDetails.responseText;
-
document.getElementById('q').value = response.split('["')[2].split('"')[0];
-
}
-
});
-
}
-
var quer = document.getElementById('q');
-
quer.onkeydown = "alert('asa');";
onKeyDown = function() { ... };
onkeydown = function() { ... };
onkeydown = "...";
onKeyDown = "...";
onKeyDown = makeRequest;
onkeydown = makeRequest;