Revert attempt at deferring file selector

Reverts most of c44bbde511 which failed to remove the previous file uploader leftypol/leftypol#37
This commit is contained in:
discomrade 2021-11-11 09:42:03 -01:00
parent e6212c1a51
commit b3adcfe98b
2 changed files with 2 additions and 4 deletions

View File

@ -191,7 +191,3 @@ $(document).ready(function () {
}
});
$(document).ready(function () {
var maxImages = document.querySelector("form[name=post]").dataset.maxImages;
init_file_selector(Number(maxImages));
});

View File

@ -148,6 +148,8 @@
<td class="upload-area">
<input type="file" name="file" id="upload_file">
<script type="text/javascript">if (typeof init_file_selector !== 'undefined') init_file_selector({{ config.max_images }});</script>
{% if config.allow_upload_by_url %}
<div style="float:none;text-align:left" id="upload_url">
<label for="file_url">{% trans %}Or URL{% endtrans %}</label>: