[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [check/master] Listen for a language change.
commit ba07a3d01a283a9ea70a9df95506fbf00cabaf69
Author: Arlo Breault <arlolra@xxxxxxxxx>
Date: Thu Oct 10 14:27:28 2013 -0700
Listen for a language change.
Just an enhancement.
---
public/index.html | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/public/index.html b/public/index.html
index 2c6adbe..450c533 100644
--- a/public/index.html
+++ b/public/index.html
@@ -6,7 +6,7 @@
{{ if .Small }}<input type="hidden" name="small" value="1" />{{ end }}
{{ if And .IsTor (Not .UpToDate) }}<input type="hidden" name="uptodate" value="0" />{{ end }}
<label for="lang" class="small">{{ GetText .Lang "This page is also available in the following languages:" }}</label>
- <select name="lang" onchange="onChange()">
+ <select id="cl" name="lang">
{{ $out := . }}
<option value="en_US">
{{ range $k, $i := .Locales }}
@@ -45,9 +45,8 @@
{{ end }}
{{ define "foot" }}
<script>
- function onChange() {
- var form = document.getElementById("lang");
- form.submit();
- }
+ document.getElementById("cl").addEventListener("change", function () {
+ document.getElementById("lang").submit();
+ });
</script>
{{ end }}
\ No newline at end of file
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits