fsd
This commit is contained in:
parent
92625aada3
commit
9d14b628e6
9 changed files with 46 additions and 52 deletions
|
@ -160,10 +160,9 @@ function getGif(searchTerm) {
|
||||||
|
|
||||||
cancelBtn.innerHTML = '<button class="btn btn-link pl-3 pr-0" id="gifs-cancel-btn" onclick="getGif();"><i class="fas fa-times text-muted"></i></button>';
|
cancelBtn.innerHTML = '<button class="btn btn-link pl-3 pr-0" id="gifs-cancel-btn" onclick="getGif();"><i class="fas fa-times text-muted"></i></button>';
|
||||||
|
|
||||||
$.ajax({
|
|
||||||
url: "/giphy?searchTerm=" + searchTerm + "&limit=48",
|
fetch("/giphy?searchTerm=" + searchTerm + "&limit=48")
|
||||||
type: "GET",
|
.then(response => {
|
||||||
success: function(response) {
|
|
||||||
var max = response.data.length - 1 //length of response, minus 1 (cuz array starts at index 0)
|
var max = response.data.length - 1 //length of response, minus 1 (cuz array starts at index 0)
|
||||||
var randomNumber = Math.round(Math.random() * 6) //random number between 0 and max -1
|
var randomNumber = Math.round(Math.random() * 6) //random number between 0 and max -1
|
||||||
// GIF array
|
// GIF array
|
||||||
|
@ -201,15 +200,10 @@ function getGif(searchTerm) {
|
||||||
loadGIFs.innerHTML = '<div class="text-center py-3"><div class="mb-3"><i class="fad fa-grin-beam-sweat text-gray-500" style="font-size: 3.5rem;"></i></div><p class="font-weight-bold text-gray-500 mb-0">Thou've reached the end of the list!</p></div>';
|
loadGIFs.innerHTML = '<div class="text-center py-3"><div class="mb-3"><i class="fad fa-grin-beam-sweat text-gray-500" style="font-size: 3.5rem;"></i></div><p class="font-weight-bold text-gray-500 mb-0">Thou've reached the end of the list!</p></div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
})
|
||||||
error: function(e) {
|
|
||||||
alert(e);
|
|
||||||
}
|
}
|
||||||
});
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function insertGIF(url,form) {
|
function insertGIF(url,form) {
|
||||||
|
|
||||||
var gif = "";
|
var gif = "";
|
|
@ -1369,7 +1369,7 @@
|
||||||
|
|
||||||
{% include "expanded_image_modal.html" %}
|
{% include "expanded_image_modal.html" %}
|
||||||
|
|
||||||
<script src="/assets/js/general35.js"></script>
|
<script src="/assets/js/general36.js"></script>
|
||||||
|
|
||||||
|
|
||||||
{% if request.path=='/' and g.system and g.timestamp>session.get('tooltip_last_dismissed',0)+60*60*24 and (not g.system.endswith('/chrome') and not g.system.endswith('/other')) and not g.system.endswith('/webview') %}
|
{% if request.path=='/' and g.system and g.timestamp>session.get('tooltip_last_dismissed',0)+60*60*24 and (not g.system.endswith('/chrome') and not g.system.endswith('/other')) and not g.system.endswith('/webview') %}
|
||||||
|
|
|
@ -192,6 +192,6 @@ Allowed styles:
|
||||||
|
|
||||||
{% include "expanded_image_modal.html" %}
|
{% include "expanded_image_modal.html" %}
|
||||||
|
|
||||||
<script src="/assets/js/general35.js"></script>
|
<script src="/assets/js/general36.js"></script>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -130,7 +130,7 @@
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script>
|
||||||
<script src="https://code.jquery.com/jquery-3.1.1.slim.min.js"></script>
|
<script src="https://code.jquery.com/jquery-3.1.1.slim.min.js"></script>
|
||||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
|
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
|
||||||
<script src="/assets/js/general35.js"></script>
|
<script src="/assets/js/general36.js"></script>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
|
|
||||||
|
|
|
@ -258,7 +258,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="/assets/js/general35.js"></script>
|
<script src="/assets/js/general36.js"></script>
|
||||||
|
|
||||||
{% block onload %}{% endblock %}
|
{% block onload %}{% endblock %}
|
||||||
|
|
||||||
|
|
|
@ -205,7 +205,7 @@
|
||||||
<script src="https://code.jquery.com/jquery-3.1.1.slim.min.js"></script>
|
<script src="https://code.jquery.com/jquery-3.1.1.slim.min.js"></script>
|
||||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
|
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
|
||||||
|
|
||||||
<script src="/assets/js/general35.js"></script>
|
<script src="/assets/js/general36.js"></script>
|
||||||
|
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -235,7 +235,7 @@
|
||||||
|
|
||||||
<!-- {{'SITE_NAME' | app_config}} JS -->
|
<!-- {{'SITE_NAME' | app_config}} JS -->
|
||||||
|
|
||||||
<script src="/assets/js/general35.js"></script>
|
<script src="/assets/js/general36.js"></script>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
|
|
||||||
|
|
|
@ -124,7 +124,7 @@
|
||||||
|
|
||||||
<!-- {{'SITE_NAME' | app_config}} JS -->
|
<!-- {{'SITE_NAME' | app_config}} JS -->
|
||||||
|
|
||||||
<script src="/assets/js/general35.js"></script>
|
<script src="/assets/js/general36.js"></script>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script>
|
||||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
|
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
||||||
<script src="/assets/js/general35.js"></script>
|
<script src="/assets/js/general36.js"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue