Skip to content

Commit

Permalink
Baseurl and parsing fixes (#3)
Browse files Browse the repository at this point in the history
* update baseurl to stolaf.dev for CORS purposes
* use top-level department parameter (departments are in revisions)
  • Loading branch information
drewvolz authored Mar 30, 2019
1 parent 1026845 commit b7dc1ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<body>
<div class='course-container'></div>
<script>
const baseUrl = 'https://stodevx.github.io/course-data/'
const baseUrl = 'https://stolaf.dev/course-data'
const fetchJson = (...args) => fetch(...args).then(r => r.json())
fetchJson(`${baseUrl}/info.json`)
.then(info => {
Expand All @@ -37,7 +37,7 @@
itemClone.className = 'course'
let els = courses.map(c => {
let item = itemClone.cloneNode()
item.textContent = `${c.departments.join('/')} ${c.number}`
item.textContent = `${c.department} ${c.number}`
return item
})
console.timeEnd('elemented')
Expand Down

0 comments on commit b7dc1ce

Please sign in to comment.