From 1d78793add2c65545f7f37dbd75ab7decc399cea Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Sat, 5 Jan 2019 13:15:58 +0100 Subject: [PATCH] Remove inline script from debian/ubuntu download page --- media/js/main.js | 10 ++++++---- templates/pages/download/linux/debian.html | 2 +- templates/pages/download/linux/ubuntu.html | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/media/js/main.js b/media/js/main.js index 5a360bd8..30b7bf79 100644 --- a/media/js/main.js +++ b/media/js/main.js @@ -27,7 +27,9 @@ window.addEventListener("hashchange", shiftWindow); /* * Debian/Ubuntu download dropdowns */ -function updateDebianSeries(select) { - var deb = document.getElementById('series-deb'); - deb.innerHTML = select.value; -} +$(function() { + $('select#debseries').change(function() { + var deb = document.getElementById('series-deb'); + deb.innerHTML = $(this).val(); + }); +}); diff --git a/templates/pages/download/linux/debian.html b/templates/pages/download/linux/debian.html index cfa521da..bb7b70d3 100644 --- a/templates/pages/download/linux/debian.html +++ b/templates/pages/download/linux/debian.html @@ -40,7 +40,7 @@ To use the apt repository, follow these steps:

  1. - diff --git a/templates/pages/download/linux/ubuntu.html b/templates/pages/download/linux/ubuntu.html index 0a13a485..ac2b8008 100644 --- a/templates/pages/download/linux/ubuntu.html +++ b/templates/pages/download/linux/ubuntu.html @@ -41,7 +41,7 @@ To use the apt repository, follow these steps:

    • -