Fix missing wwwurl in Weather.js and TagPage class

This commit is contained in:
Dale Davies
2022-07-07 08:46:56 +01:00
parent 0b43bb90c4
commit 3331f2cce2
4 changed files with 4 additions and 4 deletions

View File

@@ -55,7 +55,7 @@ export default class Main {
if (JUMP.unsplashcolor) {
backgroundelm.style.backgroundColor = JUMP.unsplashcolor;
}
fetch('/api/unsplashdata.php?token=' + JUMP.token)
fetch(JUMP.wwwurl + '/api/unsplashdata.php?token=' + JUMP.token)
.then(response => response.json())
.then(data => {
if (data.error) {

View File

@@ -22,7 +22,7 @@ class TagPage extends AbstractPage {
'ampmclock' => $this->config->parse_bool($this->config->get('ampmclock', false)),
'unsplash' => !!$this->config->get('unsplashapikey', false),
'unsplashcolor' => $unsplashdata?->color,
'url' => $this->config->get('url', false),
'wwwurl' => $this->config->get_wwwurl(),
];
if ($this->config->parse_bool($this->config->get('showsearch', false))) {
$templatecontext = array_merge($templatecontext, [

View File

@@ -33,6 +33,6 @@
{{/ hastags}}
<span class="unsplash"></span>
<div class="background fixed"></div>
<script defer src="{{{wwwurl}}}/assets/js/index.dd5072271e045a59dece.min.js"></script>
<script defer src="{{{wwwurl}}}/assets/js/index.21f3e4a8054295170830.min.js"></script>
</body>
</html>