diff --git a/templates/search.html b/templates/search.html
old mode 100644
new mode 100755
index f3437d5..c70acf3
--- a/templates/search.html
+++ b/templates/search.html
@@ -18,7 +18,8 @@
@@ -52,15 +53,18 @@
@@ -73,12 +77,23 @@
{# Sort order #}
{# Results per page #}
@@ -100,9 +115,13 @@
document.getElementById("sfrm").submit();
}
-
+
{% else %}
-
+
{% endif %}
@@ -182,8 +201,11 @@
For better results:
- Try checking the 'Match any word' box for a broader search.
- - Make sure you don't include the file extension in your query (Use the appropriate field to filter file types)
- - If you're searching for files in a particular website, use the website search page
+ - Make sure you don't include the file extension in your query (Use the appropriate field to
+ filter file types)
+
+ - If you're searching for files in a particular website, use the website
+ search page
@@ -239,15 +261,15 @@
grid: false,
force_edges: true,
min: 0,
- max: Math.floor(Date.now()/1000),
+ max: Math.floor(Date.now() / 1000),
from: {{ date_min if date_min else 0 }},
to: {{ date_max if date_max else "self.max"}},
min_interval: 3600 * 24 * 7,
step: 3600 * 24,
drag_interval: true,
prettify: function (num) {
- let date = (new Date(num*1000));
- return date.getUTCFullYear() + "-" + ("0" + (date.getUTCMonth()+1)).slice(-2) + "-" + ("0" + date.getUTCDate()).slice(-2)
+ let date = (new Date(num * 1000));
+ return date.getUTCFullYear() + "-" + ("0" + (date.getUTCMonth() + 1)).slice(-2) + "-" + ("0" + date.getUTCDate()).slice(-2)
},
onFinish: function (e) {
document.getElementById("dateMin").value = e.from;
@@ -258,11 +280,20 @@
//Next button
function nextPage() {
document.getElementById("page").value = parseInt(document.getElementById("page").value) + 1;
- grecaptcha.execute();
+ {% if show_captcha %}
+ grecaptcha.execute();
+ {% else %}
+ document.getElementById("sfrm").submit()
+ {% endif %}
}
+
function prevPage() {
document.getElementById("page").value = parseInt(document.getElementById("page").value) - 1;
- grecaptcha.execute();
+ {% if show_captcha %}
+ grecaptcha.execute();
+ {% else %}
+ document.getElementById("sfrm").submit()
+ {% endif %}
}