return results[1] || 0;
}
-$("a.download-splash").click(function(event) {
- event.preventDefault();
- linkLocation = this.href;
-
- window.location = "https://downloads.ipfire.org/download-splash?file="+linkLocation;
-});
-
-if (/.*download-splash.*/i.test(window.location.href)) {
- $("p.download-path").ready(function(){
- var valid = false;
- var allowed_prefixes = [
- "https://downloads.ipfire.org/",
- ]
-
- var file_url = $.query("file");
-
- // Only accept URLs beginning with our known prefix.
- for (i in allowed_prefixes) {
- prefix = allowed_prefixes[i];
- if (file_url.substring(0, prefix.length) == prefix) {
- valid = true;
- }
- }
-
- if (valid) {
- $("p.download-path").prepend($("<a>", {
- href: encodeURI(file_url),
- text: file_url
- }))
- setTimeout(function() { window.location = file_url }, "2000");
- }
- });
-}
-
/* $(".planet-search-autocomplete").typeahead({
source: function(query, process) {
$.get("/api/planet/search/autocomplete", { q: query }, function(data) {
{% for file in release.get_files_by_arch(arch) %}
<li class="list-group-item d-flex flex-column align-items-start">
<div class="d-flex w-100 justify-content-between">
- <a class="download-splash" href="{{ file.url }}">{{ _(file.desc) }}</a>
+ <a href="{{ file.url }}">{{ _(file.desc) }}</a>
{% if file.size >= 1024 * 1024 %}
<span class="text-muted">{{ format_size(file.size) }}</span>