-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js
34 lines (25 loc) · 887 Bytes
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// DDK - Automatically loads high resolution tumblr images,
//
// blah blah explain stuff here
//
// This is free and unencumbered software released into the public domain.
var Widget = require("widget").Widget;
var tabs = require("tabs");
var Request = require("request").Request;
var checkImageExists = Request({
url: "http://bbot.org/bbot.png",
onComplete: function (response) {
console.log("Sent request to"); //oops how do I put a variable in a string
}
});
exports.main = function() {
new Widget({
id: "sbierwagen-widget-1",
label: "My Mozilla Widget",
contentURL: "http://www.mozilla.org/favicon.ico",
onClick: function(event) {
// Tabs documentation: https://addons.mozilla.org/en-US/developers/docs/sdk/latest/modules/sdk/tabs.html
checkImageExists.get();
}
});
};