Update
This commit is contained in:
parent
0080dab4f0
commit
7612773807
|
@ -1,3 +1,6 @@
|
||||||
|
let query = window.location.pathname;
|
||||||
|
|
||||||
|
if(query == "/mastodon") {
|
||||||
let tplUrl = 'json/mastodon-tpl.html';
|
let tplUrl = 'json/mastodon-tpl.html';
|
||||||
let response = await fetch(tplUrl);
|
let response = await fetch(tplUrl);
|
||||||
var tpl = "";
|
var tpl = "";
|
||||||
|
@ -16,7 +19,7 @@ try {
|
||||||
|
|
||||||
} catch(error) {
|
} catch(error) {
|
||||||
// DOMException: The user aborted a request.
|
// DOMException: The user aborted a request.
|
||||||
console.log('Error: ', error)
|
console.log('Error: ', error);
|
||||||
log.innerHTML = "<p>1) Ой всё сломалось :(</p>";
|
log.innerHTML = "<p>1) Ой всё сломалось :(</p>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,3 +107,4 @@ async function openInNewTab(url) {
|
||||||
}
|
}
|
||||||
|
|
||||||
fetchData();
|
fetchData();
|
||||||
|
}
|
||||||
|
|
|
@ -287,6 +287,8 @@
|
||||||
|
|
||||||
<script src="assets/js/script.js"></script>
|
<script src="assets/js/script.js"></script>
|
||||||
|
|
||||||
|
<script src="assets/js/mastodon.js" type="module" async="async"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -2,5 +2,4 @@
|
||||||
<link rel="stylesheet" href="assets/css/mastodon.css" media="all">
|
<link rel="stylesheet" href="assets/css/mastodon.css" media="all">
|
||||||
|
|
||||||
<div id="log"></div>
|
<div id="log"></div>
|
||||||
<script src="assets/js/mastodon.js" type="module" async="async"></script>
|
|
||||||
</div><!-- /.container -->
|
</div><!-- /.container -->
|
||||||
|
|
Loading…
Reference in New Issue