Skip to content

Commit

Permalink
Fix slideshow query
Browse files Browse the repository at this point in the history
  • Loading branch information
zincarla committed Mar 11, 2021
1 parent b194b77 commit f9083ed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion http/image-slideshow-js.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{{template "header.html" .}}
<body>
<script>
OGQuery = "{{.OldQuery}}";
SSImageQuery = encodeURI("{{.OldQuery}}");
function OnLoadStartNextSlideTimer() {
var time = {{.SlideShowSpeed}};
Expand All @@ -11,7 +12,7 @@
}
function LoadNextSlide() {
//Call API to get random image
fetch("/api/Images?SearchTerms="+SSImageQuery+"&SearchType=random")
fetch("/api/Images?SearchQuery="+SSImageQuery+"&SearchType=random")
.then((resp) => resp.json()) //Convert response to json
.then(function(jsonData) {
EmbedData = GetEmbedForContent(jsonData.Images[0].Location);
Expand Down

0 comments on commit f9083ed

Please sign in to comment.