Skip to content

Commit

Permalink
Update main.js
Browse files Browse the repository at this point in the history
change domain
  • Loading branch information
Pragmatism0220 authored Feb 23, 2021
1 parent 8aa4818 commit be5dfa3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions assets/js/main.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
var DOMAIN = "https://chiuhsiang.com";

$(document).ready(function () {
getAchives();
getHitokoto();
Expand Down Expand Up @@ -26,7 +28,7 @@ function getAchives() {
t = ``;
$.ajax({
type: "GET",
url: "https://pragmatism0220.cf/wp-json/wp/v2/posts?per_page=8&page=1",
url: DOMAIN.replace(/^(\s|\/)+|(\s|\/)+$/g, '') + "/wp-json/wp/v2/posts?per_page=8&page=1",
dataType: "json",
success: function(json) {
for (var i = 0; i < json.length; i++) {
Expand Down Expand Up @@ -105,4 +107,4 @@ xhr.onload = function () {
});
}
}
xhr.send();
xhr.send();

0 comments on commit be5dfa3

Please sign in to comment.