forked from MarseyWorld/MarseyWorld
fix submit.js
parent
47b6139f7c
commit
e73fa11696
|
@ -1,17 +1,17 @@
|
|||
document.getElementById('post-title').value = localStorage.getItem("post_title")
|
||||
document.getElementById('post-text').value = localStorage.getItem("post_text")
|
||||
document.getElementById('post-url').value = localStorage.getItem("post_url")
|
||||
|
||||
markdown(document.getElementById("post-text"));
|
||||
|
||||
function checkForRequired() {
|
||||
const title = document.getElementById("post-title");
|
||||
const text = document.getElementById("post-text");
|
||||
const url = document.getElementById("post-url");
|
||||
const text = document.getElementById("post-text");
|
||||
const button = document.getElementById("create_button");
|
||||
const image = document.getElementById("file-upload");
|
||||
const image2 = document.getElementById("file-upload-submit");
|
||||
|
||||
title.value = localStorage.getItem("post_title")
|
||||
text.value = localStorage.getItem("post_text")
|
||||
url.value = localStorage.getItem("post_url")
|
||||
|
||||
markdown(text);
|
||||
|
||||
function checkForRequired() {
|
||||
if (url.value.length > 0 || image.files.length > 0 || image2.files.length > 0) {
|
||||
text.required = false;
|
||||
url.required=false;
|
||||
|
@ -37,8 +37,8 @@ function checkForRequired() {
|
|||
checkForRequired();
|
||||
|
||||
function hide_image() {
|
||||
const x=document.getElementById('image-upload-block');
|
||||
let url=document.getElementById('post-url').value;
|
||||
x=document.getElementById('image-upload-block');
|
||||
url=document.getElementById('post-url').value;
|
||||
if (url.length>=1){
|
||||
x.classList.add('d-none');
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ set CACHE_VER = {
|
|||
'js/formatting.js': 240,
|
||||
'js/lottery.js': 256,
|
||||
'js/marked.js': 283,
|
||||
'js/submit.js': 268,
|
||||
'js/submit.js': 269,
|
||||
'js/userpage.js': 243,
|
||||
'js/userpage_v.js': 245,
|
||||
'js/lozad.js': 260,
|
||||
|
|
Loading…
Reference in New Issue