X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=view%2Ftheme%2Ffrost%2Fjs%2Ftheme.js;h=bf7bdd585c625c0ced878e51c6c9f1f6d26c59fb;hb=25662eb6f4fe6a3218d2723d39a2a09376363849;hp=52e181a6226f76cb62fe2b256bb1561e9d259c63;hpb=6a165656426a533848554e7b8e0fae2e70f21399;p=friendica.git diff --git a/view/theme/frost/js/theme.js b/view/theme/frost/js/theme.js index 52e181a622..bf7bdd585c 100644 --- a/view/theme/frost/js/theme.js +++ b/view/theme/frost/js/theme.js @@ -603,19 +603,11 @@ function insertFormatting(BBcode, id) { if (document.selection) { textarea.focus(); selected = document.selection.createRange(); - if (BBcode == "url") { - selected.text = "["+BBcode+"=http://]" + selected.text + "[/"+BBcode+"]"; - } else { - selected.text = "["+BBcode+"]" + selected.text + "[/"+BBcode+"]"; - } + selected.text = "["+BBcode+"]" + selected.text + "[/"+BBcode+"]"; } else if (textarea.selectionStart || textarea.selectionStart == "0") { var start = textarea.selectionStart; var end = textarea.selectionEnd; - if (BBcode == "url") { - textarea.value = textarea.value.substring(0, start) + "["+BBcode+"=http://]" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length); - } else { - textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length); - } + textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length); } return true;