Set the request query as input value in the frontend.

parent ed513ed6
...@@ -5,6 +5,10 @@ ...@@ -5,6 +5,10 @@
var trigger_update = true; var trigger_update = true;
var input_textarea = $('#MathInput'); var input_textarea = $('#MathInput');
// Set the requested query as input value if a query string is given.
if (location.search.substr(0, 3) == '?q=')
input_textarea.val(decodeURIComponent(location.search.substr(3)));
input_textarea.change(function(){ trigger_update = true; }) input_textarea.change(function(){ trigger_update = true; })
.keyup(function(){ trigger_update = true; }); .keyup(function(){ trigger_update = true; });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment