Skip to content
This repository has been archived by the owner on Jan 10, 2019. It is now read-only.

Commit

Permalink
still working...
Browse files Browse the repository at this point in the history
  • Loading branch information
rpicard committed Mar 31, 2012
1 parent 1cca6d3 commit c20a99a
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions js/background.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
window.addEventListener('load', function() {

function getQuery() {

$.getJSON('http://en.wikipedia.org/w/api.php?callback=?',
{
action: "query",
list: "random",
rnnamespace: "0",
rnlimit: "1",
format: "json"
},
function(data) {

var title = "testing";

$("#searchBox").val(title);

if (opera.contexts.speeddial) {
var url = "http://duckduckgo.com/?q=" + encodeURIComponent(title);
var sd = opera.contexts.speeddial;
var sd = opera.contexts.speeddial;

sd.url = url;
}

return 0;
}

getQuery();
});

}, false);

0 comments on commit c20a99a

Please sign in to comment.