Browse Source

Call upload-selection.js inline

Makes the change happen earlier, reducing content shift
pull/60/head
discomrade 3 years ago
parent
commit
e1b83ec548
  1. 4
      js/upload-selection.js
  2. 3
      templates/post_form.html

4
js/upload-selection.js

@ -12,7 +12,7 @@
*
*/
$(function(){
function init_upload_selection(){
var enabled_file = true;
var enabled_url = $("#upload_url").length > 0;
var enabled_embed = $("#upload_embed").length > 0;
@ -84,4 +84,4 @@ $(function(){
enable_file();
}
});
}

3
templates/post_form.html

@ -210,6 +210,9 @@
<input type="hidden" name="hash" value="{{ antibot.hash() }}">
</form>
{% if 'js/upload-selection.js' in config.additional_javascript %}
<script type="text/javascript">if (typeof init_upload_selection !== 'undefined') init_upload_selection();</script>
{% endif %}
<script type="text/javascript">{% raw %}
rememberStuff();
{% endraw %}</script>

Loading…
Cancel
Save