]> git.ipfire.org Git - ipfire.org.git/commitdiff
Remove download splash
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 1 Sep 2018 12:06:12 +0000 (13:06 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 1 Sep 2018 12:06:12 +0000 (13:06 +0100)
I have no good content for that and for now this being
removed.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/static/js/site.js
src/templates/download/modules/button.html
src/templates/download/release.html

index 95a150c7d5ac93cdd50d746e424a6253aae1ca67..25d08dc59e006a4450732e0634b5275db7f857cb 100644 (file)
@@ -20,40 +20,6 @@ $.query = function(name){
        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) {
index d8b190d88e20165cca674658e2ddf1235a09f06b..66990d2d4a0fc9169cba82708851f833399d0f5a 100644 (file)
@@ -1,3 +1,3 @@
-<a class="btn btn-primary btn-lg download-splash my-2" href="{{ file.url }}">
+<a class="btn btn-primary btn-lg my-2" href="{{ file.url }}">
        {{ _("%s for %s") % (release, file.arch) }}
 </a>
index 02130e31a38118e91cf27331c60557cd68460f56..b45302a6a54ea46b34b4090fe33e3d79bbfe7b64 100644 (file)
@@ -26,7 +26,7 @@
                                        {% 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>