This commit is contained in:
Aevann1 2021-12-11 02:59:37 +02:00
parent c21c85ed2b
commit c35f72f31e
5 changed files with 6 additions and 17 deletions

View file

@ -1,6 +1,5 @@
function formkey() { function formkey() {
let formkey = document.getElementById("formkey") return document.getElementById("formkey").innerHTML
if (formkey) return formkey.innerHTML;
} }
document.addEventListener("DOMContentLoaded", function(){ document.addEventListener("DOMContentLoaded", function(){
@ -22,8 +21,6 @@ function post_toast(url, reload, data) {
} }
} }
form.append("formkey", formkey());
xhr.withCredentials=true; xhr.withCredentials=true;
xhr.onload = function() { xhr.onload = function() {

View file

@ -296,10 +296,6 @@
<link rel="stylesheet" href="/assets/css/lite-youtube.css?v=3"> <link rel="stylesheet" href="/assets/css/lite-youtube.css?v=3">
<script src="/assets/js/lite-youtube.js?v=3"></script> <script src="/assets/js/lite-youtube.js?v=3"></script>
{% if v %}
<div id="formkey" class="d-none">{{v.formkey}}</div>
{% endif %}
</body> </body>
</html> </html>

View file

@ -224,3 +224,7 @@
font-weight: 700; font-weight: 700;
} }
</style> </style>
{% if v %}
<div id="formkey" class="d-none">{{v.formkey}}</div>
{% endif %}

View file

@ -121,8 +121,4 @@
</div> </div>
</div> </div>
{% if v %}
<div id="formkey" class="d-none">{{v.formkey}}</div>
{% endif %}
{% endblock %} {% endblock %}

View file

@ -687,8 +687,4 @@
{% include "emoji_modal.html" %} {% include "emoji_modal.html" %}
{% include "gif_modal.html" %} {% include "gif_modal.html" %}
{% if v %}
<div id="formkey" class="d-none">{{v.formkey}}</div>
{% endif %}
{% endblock %} {% endblock %}