commit 7115b47ebd6bc40388dd14a45299a77ebe13c040 Author: Sathyanarayanan Gunasekaran gsathya.ceg@gmail.com Date: Wed Sep 12 20:47:31 2012 +0530
Remove filterArgs()
I previously added a 'hacky' filterArgs() to remove the unnecessary parameters from the GET request by setting the 'name' parameter to null for empty args, but it's broken now and I need to remove the empty params and reconstruct the URL manually using javascript. I'd rather just let them be for now. --- static/js/custom.js | 11 ----------- templates/index.html | 1 - 2 files changed, 0 insertions(+), 12 deletions(-)
diff --git a/static/js/custom.js b/static/js/custom.js index 6ef85be..2144e89 100644 --- a/static/js/custom.js +++ b/static/js/custom.js @@ -26,17 +26,6 @@ function doAjax(){ } }
-function filterArgs() { - var myForm = document.getElementById('form'); - var allInputs = myForm.getElementsByTagName('input'); - var input, i; - for(i = 0; input = allInputs[i]; i++) { - if(input.getAttribute('name') && !input.value) { - input.setAttribute('name', ''); - } - } -} - function parseArgs(query){ var newQuery = {}, key, value; query = String(query); diff --git a/templates/index.html b/templates/index.html index 65a5c6a..9ffe0d2 100644 --- a/templates/index.html +++ b/templates/index.html @@ -165,7 +165,6 @@ <script src="{{ url_for('static', filename='js/bootstrap.min.js') }}"></script> <script src="{{ url_for('static', filename='js/custom.js') }}"></script> <script> - filterArgs(); doAjax(); setOptions(); </script>
tor-commits@lists.torproject.org