[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [webwml/staging] Do not use onchange=<inline script>, instead add listeners in init
commit d4e1a3576666c2c516901c628d47daeb5a0c8427
Author: Peter Palfrader <peter@xxxxxxxxxxxxx>
Date: Sun Mar 19 18:31:16 2017 +0100
Do not use onchange=<inline script>, instead add listeners in init
---
docs/debian-selector.js | 4 ++++
docs/en/debian.wml | 6 +++---
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/docs/debian-selector.js b/docs/debian-selector.js
index 0b89377..dcb545a 100644
--- a/docs/debian-selector.js
+++ b/docs/debian-selector.js
@@ -49,6 +49,10 @@ var software = {
};
function init() {
+ document.getElementById("distrib").addEventListener("change", update);
+ document.getElementById("package").addEventListener("change", update);
+ document.getElementById("version").addEventListener("change", update);
+
pkg = document.getElementById('package');
for (soft in software) {
if (soft != pkg.value) {
diff --git a/docs/en/debian.wml b/docs/en/debian.wml
index e19af4f..8d52919 100644
--- a/docs/en/debian.wml
+++ b/docs/en/debian.wml
@@ -70,7 +70,7 @@ For Ubuntu, ask <a href="https://en.wikipedia.org/wiki/List_of_Ubuntu_releases#T
<div id="selector" style="display: none;">
<blockquote>
I run
-<select id="distrib" onchange="update()">
+<select id="distrib">
<option value="wheezy">Debian oldstable (wheezy)</option>
<option value="jessie" selected="selected">Debian stable (jessie)</option>
<option value="stretch">Debian testing (stretch)</option>
@@ -80,9 +80,9 @@ I run
<option value="xenial">Ubuntu Xenial Xerus</option>
</select>
and want
-<select id="package" onchange="update()"></select>
+<select id="package"></select>
version
-<select id="version" onchange="update()"></select>
+<select id="version"></select>
</blockquote>
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits