forked from rDrama/rDrama
spacing consistency
parent
d64a72cdc5
commit
40e0dfbdce
|
@ -78,19 +78,14 @@ function remove_attachment() {
|
|||
}
|
||||
|
||||
function autoSuggestTitle() {
|
||||
|
||||
const urlField = document.getElementById("post-url");
|
||||
|
||||
const titleField = document.getElementById("post-title");
|
||||
|
||||
const isValidURL = urlField.checkValidity();
|
||||
|
||||
if (isValidURL && urlField.value.length > 0 && titleField.value === "") {
|
||||
|
||||
const x = new XMLHttpRequest();
|
||||
x.onreadystatechange = function() {
|
||||
if (x.readyState == 4 && x.status == 200 && !titleField.value) {
|
||||
|
||||
title = JSON.parse(x.responseText)["title"];
|
||||
titleField.value = title;
|
||||
checkForRequired()
|
||||
|
@ -99,9 +94,7 @@ function autoSuggestTitle() {
|
|||
x.open('get','/submit/title?url=' + urlField.value);
|
||||
x.setRequestHeader('xhr', 'xhr');
|
||||
x.send(null);
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
function ghost_toggle(t) {
|
||||
|
|
Loading…
Reference in New Issue