Skip to content

Commit

Permalink
Fix typo and test build hook
Browse files Browse the repository at this point in the history
  • Loading branch information
bennettfeely committed Nov 30, 2020
1 parent af6cff1 commit bf6ae53
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion js/github.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 6 additions & 7 deletions src/js/github.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const right_bow = new Date();
const times = [
let right_now = new Date();
let times = [
["second", 1],
["minute", 60],
["hour", 3600],
Expand All @@ -12,7 +12,7 @@ const times = [
function formatTime(date) {
var date = new Date(date);

var diff = Math.round((right_bow - date) / 1000);
var diff = Math.round((right_now - date) / 1000);
for (var t = 0; t < times.length; t++) {
if (diff < times[t][1]) {
if (t == 0) {
Expand All @@ -26,13 +26,12 @@ function formatTime(date) {
}

function makeCard(repo) {
const xhr = new XMLHttpRequest();
const url = "https://api.github.com/repos/" + repo;
let xhr = new XMLHttpRequest();
let url = "https://api.github.com/repos/" + repo;

xhr.open("GET", url, true);

xhr.onload = function () {
const respo = JSON.parse(this.response);
let respo = JSON.parse(this.response);

let card = `<div class="repo-box">
<div class="repo-title">
Expand Down

0 comments on commit bf6ae53

Please sign in to comment.