forked from JoelSutherland/GitHub-jQuery-Repo-Widget
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
52 lines (40 loc) · 1.53 KB
/
index.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
<!DocType HTML>
<html lang="en-US"><head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>GitHub Web Widget Demo</title>
<!--[if lte IE 9]>
<script src="https://cdn.bootcss.com/html5-history-api/4.2.8/history.min.js"></script>
<![endif]-->
<script src="https://cdn.bootcss.com/MutationObserver.js/0.3.2/mutationobserver.min.js"></script>
<script src="https://cdn.bootcss.com/require.js/2.3.5/require.min.js"></script>
<script>
require.config({
paths: {
jquery: 'https://cdn.bootcss.com/jquery/3.2.1/jquery.min'
}
});
require(['jquery', 'EasyWebApp'], function ($) {
$.ajaxPrefilter('json', function (option, _, XHR) {
if ((new URL( option.url )).hostname === 'api.github.com')
XHR.setRequestHeader(
'Authorization',
'token 39ff883676bf43c5723e92701487a020ad1abfb2'
);
});
$( document ).ready(function () {
$('#EWA_box').iWebApp();
});
});
</script>
</head><body>
<h1>Example Widgets</h1>
<div style="max-width: 600px">
<div data-href="../source/Repository.html?repo=TechQuery/GitHub-Web-Widget">
</div>
<br>
<div data-href="../source/Profile.html?user=torvalds"></div>
</div>
<div id="EWA_box"></div>
</body></html>