git.shiar.nl
/
sc2-widget
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
keep json includes in data/ subdir
[sc2-widget]
/
widget.html
diff --git
a/widget.html
b/widget.html
index d6f5f8d66ddeef85b5e32b721724e4873d38e5b2..26bdd168836cf38547ac14f277a68e7bf195658e 100644
(file)
--- a/
widget.html
+++ b/
widget.html
@@
-13,8
+13,7
@@
<p id="clan">No clan data</p>
<script>
let request = this.location.pathname.split('/')
<p id="clan">No clan data</p>
<script>
let request = this.location.pathname.split('/')
- request.splice(2, 1) // strip page name
- fetch(request.join('/') + '.json')
+ fetch('/schtarr/data/' + request.pop() + '.json')
.then(res => {
if (res.status != 200) {
console.log('got %o', res)
.then(res => {
if (res.status != 200) {
console.log('got %o', res)