diff options
| author | czaks <marcin@6irc.net> | 2013-12-24 00:28:30 +0100 |
|---|---|---|
| committer | czaks <marcin@6irc.net> | 2013-12-24 00:28:30 +0100 |
| commit | f50eb94929713483d186851999cb8404fb2cc5a6 (patch) | |
| tree | 83b927d7de34344a0844d273f94767bf05efe914 /js/quick-reply.js | |
| parent | 0894a65f88b57383acae0d66a01a577bf81f4c04 (diff) | |
quick-reply.js: make display of embed and remote upload fields optional
Diffstat (limited to 'js/quick-reply.js')
| -rw-r--r-- | js/quick-reply.js | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/js/quick-reply.js b/js/quick-reply.js index 34d1a946..d0f38e89 100644 --- a/js/quick-reply.js +++ b/js/quick-reply.js @@ -216,13 +216,16 @@ if ($td.find('input[name="file_url"]').length) { $file_url = $td.find('input[name="file_url"]'); - // Make a new row for it - var $newRow = $('<tr><td colspan="2"></td></tr>'); + if (settings.get('show_remote', false)) { + // Make a new row for it + var $newRow = $('<tr><td colspan="2"></td></tr>'); - $file_url.clone().attr('placeholder', _('Upload URL')).appendTo($newRow.find('td')); - $file_url.parent().remove(); + $file_url.clone().attr('placeholder', _('Upload URL')).appendTo($newRow.find('td')); - $newRow.insertBefore(this); + $newRow.insertBefore(this); + } + $file_url.parent().remove(); + $td.find('label').remove(); $td.contents().filter(function() { @@ -236,6 +239,11 @@ } } + // Disable embedding if configured so + if (!settings.get('show_embed', false) && $td.find('input[name="embed"]').length) { + $(this).remove(); + } + // Remove oekaki if existent if ($(this).is('#oekaki')) { $(this).remove(); |
