forked from leftypol/leftypol
Call upload-selection.js inline
Makes the change happen earlier, reducing content shift
This commit is contained in:
parent
ae65959a48
commit
3ae859d6e6
2 changed files with 6 additions and 3 deletions
|
@ -9,10 +9,10 @@
|
||||||
* $config['additional_javascript'][] = 'js/jquery.min.js';
|
* $config['additional_javascript'][] = 'js/jquery.min.js';
|
||||||
* //$config['additional_javascript'][] = 'js/wpaint.js';
|
* //$config['additional_javascript'][] = 'js/wpaint.js';
|
||||||
* $config['additional_javascript'][] = 'js/upload-selection.js';
|
* $config['additional_javascript'][] = 'js/upload-selection.js';
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$(function(){
|
function init_upload_selection(){
|
||||||
var enabled_file = true;
|
var enabled_file = true;
|
||||||
var enabled_url = $("#upload_url").length > 0;
|
var enabled_url = $("#upload_url").length > 0;
|
||||||
var enabled_embed = $("#upload_embed").length > 0;
|
var enabled_embed = $("#upload_embed").length > 0;
|
||||||
|
@ -84,4 +84,4 @@ $(function(){
|
||||||
|
|
||||||
enable_file();
|
enable_file();
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
|
|
@ -210,6 +210,9 @@
|
||||||
<input type="hidden" name="hash" value="{{ antibot.hash() }}">
|
<input type="hidden" name="hash" value="{{ antibot.hash() }}">
|
||||||
</form>
|
</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 %}
|
<script type="text/javascript">{% raw %}
|
||||||
rememberStuff();
|
rememberStuff();
|
||||||
{% endraw %}</script>
|
{% endraw %}</script>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue