forked from MarseyWorld/MarseyWorld
parent
61858337d9
commit
f6729aab33
|
@ -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")
|
||||
const title = document.getElementById("post-title");
|
||||
const text = document.getElementById("post-text");
|
||||
const url = document.getElementById("post-url");
|
||||
const button = document.getElementById("create_button");
|
||||
const image = document.getElementById("file-upload");
|
||||
const image2 = document.getElementById("file-upload-submit");
|
||||
|
||||
markdown('post-text','preview');
|
||||
title.value = localStorage.getItem("post_title")
|
||||
text.value = localStorage.getItem("post_text")
|
||||
url.value = localStorage.getItem("post_url")
|
||||
|
||||
markdown(text);
|
||||
|
||||
function checkForRequired() {
|
||||
const title = document.getElementById("post-title");
|
||||
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");
|
||||
|
||||
if (url.value.length > 0 || image.files.length > 0 || image2.files.length > 0) {
|
||||
text.required = false;
|
||||
url.required=false;
|
||||
|
|
|
@ -131,7 +131,7 @@
|
|||
|
||||
<label for="body" class="mt-3">Text<i class="fas fa-info-circle text-gray-400 ml-1" data-bs-toggle="tooltip" data-bs-placement="top" title="Uses markdown. Limited to 20000 characters."></i></label>
|
||||
|
||||
<textarea form="submitform" id="post-text" class="form-control rounded" aria-label="With textarea" placeholder="Optional if you have a link or an image." rows="7" name="body" oninput="markdown('post-text','preview');charLimit('post-text','character-count-submit-text-form');checkForRequired();savetext()" {% if v.longpost %}minlength="280"{% endif %} maxlength="{% if v.bird %}140{% else %}20000{% endif %}" required></textarea>
|
||||
<textarea form="submitform" id="post-text" class="form-control rounded" aria-label="With textarea" placeholder="Optional if you have a link or an image." rows="7" name="body" data-preview="preview" oninput="markdown(this);charLimit('post-text','character-count-submit-text-form');checkForRequired();savetext()" {% if v.longpost %}minlength="280"{% endif %} maxlength="{% if v.bird %}140{% else %}20000{% endif %}" required></textarea>
|
||||
<div class="ghostdiv" style="display:none;"></div>
|
||||
|
||||
<div class="text-small font-weight-bold mt-1" id="character-count-submit-text-form" style="right: 1rem; bottom: 0.5rem; z-index: 3;"></div>
|
||||
|
|
|
@ -25,7 +25,7 @@ set CACHE_VER = {
|
|||
'js/formatting.js': 240,
|
||||
'js/lottery.js': 256,
|
||||
'js/marked.js': 283,
|
||||
'js/submit.js': 266,
|
||||
'js/submit.js': 267,
|
||||
'js/userpage.js': 242,
|
||||
'js/userpage_v.js': 245,
|
||||
'js/lozad.js': 260,
|
||||
|
|
Loading…
Reference in New Issue