Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d02c7d6

Browse files
Test github issue api.
1 parent e22d6bb commit d02c7d6

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

‎index.html‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,5 +129,30 @@ <h3>社区活动</h3>
129129
<p class="copyright">&copy; Since 2014. 官方 QQ 群:39615502</p>
130130
</footer>
131131

132+
<script>
133+
(function () {
134+
var url = '//api.github.com/repos/yncoder/yncoder.github.io/issues';
135+
var param = {
136+
state: 'open'
137+
};
138+
139+
var query = Object.keys(param).map(function (key) {
140+
return key + '=' + encodeURIComponent(param[key]);
141+
}).join('&');
142+
143+
var request = new XMLHttpRequest();
144+
request.open('GET', url + (query ? '?' + query : ''), true);
145+
146+
request.onreadystatechange = function () {
147+
if (this.readyState == 4 &&
148+
this.status >= 200 && this.status < 300) {
149+
console.log(this.responseText);
150+
}
151+
};
152+
153+
request.send(null);
154+
})();
155+
</script>
156+
132157
</body>
133158
</html>

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /