diff --git a/static/script.js b/static/script.js deleted file mode 100644 index aabdd2f..0000000 --- a/static/script.js +++ /dev/null @@ -1,40 +0,0 @@ -Node.prototype.gel = function (id) { - return this.getElementById(id); -} - -Node.prototype.gcn = function (classname) { - return this.getElementsByClassName(classname); -} - -function dgel(id) { - return document.getElementById(id); -} - -function dgcn(classname) { - return document.getElementsByClassName(classname); -} - -/** - * Asynchronous function. Promises the text content of url. Automatically adds/removes from the loading counter. - * @param {string} url URL to request. Note that unless cross-domain is specifically permitted, this URL must come from the same domain as this file. - */ -async function ajax(url) { //must be called from an async function! use 'await', e.g. "var result = await ajax('https://google.com');" - return new Promise(resolve => { - var pageGetter = new XMLHttpRequest; - pageGetter.onreadystatechange = function () { - if (this.readyState == 4 && this.status == 200) { - resolve(this.responseText); - } else if (this.readyState == 4) { - resolve('Error: Expecting HTTP 200, got HTTP ' + this.status) - } - } - pageGetter.open('GET', url, true) - pageGetter.send(); - }); -} - -async function cont() { - url = dgel('instance-input').value; - j = await ajax('/internal/auth_a?url=' + url) - console.log(j) -} \ No newline at end of file diff --git a/templates/create_password.html b/templates/create_password.html index 489921a..25829fe 100644 --- a/templates/create_password.html +++ b/templates/create_password.html @@ -7,9 +7,6 @@