forked from cho45/jsdeferred
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuserscript-test.html
68 lines (58 loc) · 1.19 KB
/
userscript-test.html
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>JSDeferred Sample</title>
<script type="text/javascript" src="jsdeferred.js"></script>
<script type="text/javascript" src="binding/userscript.js"></script>
<script type="text/javascript">
// <![CDATA[
window.onload = function () {
with (D()) {
http.jsonp("http://wedata.net/databases/AutoPagerize/items.json").next(function (data) {
alert(data);
});
}
};
// ]]>
</script>
<style type="text/css">
body {
padding: 0 10% 10em;
margin: 0;
color: #333;
line-height: 1.5;
}
h2 {
margin: 3em 0 1.5em 0;
}
div.code,
pre {
font-size: 80%;
font-family: monospace;
background: #efefef;
border: 1px solid #ddd;
padding: 1em;
line-height: 1.33;
overflow: auto;
}
em,
span.em {
font-weight: bold;
font-style: normal;
color: #f00;
}
textarea {
width: 100%;
}
#footer {
margin: 2em 0;
text-align: right;
font-size: 80%;
}
</style>
</head>
<body>
<div id="whole">
</div>
</body>
</html>