aboutsummaryrefslogtreecommitdiffstats
path: root/python/Dawn/static/utils.js
diff options
context:
space:
mode:
Diffstat (limited to 'python/Dawn/static/utils.js')
-rw-r--r--python/Dawn/static/utils.js26
1 files changed, 0 insertions, 26 deletions
diff --git a/python/Dawn/static/utils.js b/python/Dawn/static/utils.js
deleted file mode 100644
index befcc442..00000000
--- a/python/Dawn/static/utils.js
+++ /dev/null
@@ -1,26 +0,0 @@
-function $(s) {
- return( document.getElementById(s) );
-}
-
-function encode_dict(d){
- var r = [];
- for(var k in d){
- r.push(encodeURIComponent(k) + '=' + encodeURIComponent(d[k]));
- }
- return r.join('&');
-}
-
-function query(url, params, callback){
- var xhr = new XMLHttpRequest();
- xhr.open('GET', url + '?' + encode_dict(params));
- xhr.onreadystatechange = function() {
- if( xhr.readyState === 4 ) {
- if( xhr.status === 200 ) {
- callback(xhr.responseText);
- } else if ( xhr.status === 400 ) {
- console.log(xhr.responseText);
- }
- }
- };
- xhr.send();
-}