removed javascript

This commit is contained in:
Lynne Megido 2018-11-07 09:13:21 +10:00
parent 2cd1e24633
commit c3f3cccf1f
Signed by: lynnesbian
GPG Key ID: FB7B970303ACE499
6 changed files with 2 additions and 55 deletions

View File

@ -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)
}

View File

@ -7,9 +7,6 @@
<body>
<h1>Create password</h1>
<h2>Please enter a password for your new Curious Greg account.</h2>
<noscript>
Curious Greg will not function without JavaScript. Please ensure you have JavaScript enabled.
</noscript>
<!-- <div id='logo-main'></div> -->
<form action='/internal/create_account' method='POST'>
<div id='form-avi' style='background-image:url("https://fedi.lynnesbian.space/system/accounts/avatars/000/000/002/original/7ebcb4b973eee926.gif?1541354017")'></div>

View File

@ -7,9 +7,6 @@
<body>
<h1>Welcome</h1>
<h2>You're all set up and ready to go.</h2>
<noscript>
Curious Greg will not function without JavaScript. Please ensure you have JavaScript enabled.
</noscript>
<!-- <div id='logo-main'></div> -->
<div id='body'>
You haven't posted to Curious Cat in a while, so we'll wait <strong>14 minutes</strong> until we check for new answers.

View File

@ -1,3 +1,2 @@
<link rel='stylesheet' type='text/css' href="{{ url_for('static', filename='style.css') }}" />
<script type="text/javascript" src="{{ url_for('static', filename='script.js') }}"></script>
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300" rel="stylesheet">

View File

@ -7,14 +7,11 @@
<body>
<h1>Curious Greg</h1>
<h2>Connect your Curious Cat and Mastodon accounts for automated crossposting.</h2>
<noscript>
Curious Greg will not function without JavaScript. Please ensure you have JavaScript enabled.
</noscript>
<!-- <div id='logo-main'></div> -->
<form onsubmit='cont(); return false'>
<form action='/internal/create_app' method='POST'>
<label for='instance'>Instance URL</label><br />
<input name='instance' placeholder='mastodon.social' id='instance-input' /><br />
<button class='loading'>Sign Up</button>
<button>Sign Up</button>
</form>
<br /><br />
<a class='button' href='/login'>Log In</a>

View File

@ -7,9 +7,6 @@
<body>
<h1>Log in</h1>
<h2>Log in to your Curious Greg account.</h2>
<noscript>
Curious Greg will not function without JavaScript. Please ensure you have JavaScript enabled.
</noscript>
<!-- <div id='logo-main'></div> -->
<form action='/internal/do_login' method='POST'>
<label for='acct'>Mastodon Account</label><br />