X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=view%2Ftheme%2Ffrost-mobile%2Fjs%2Ftheme.js;h=09b5e4d3831fe9bcd4463588ec552032072e4531;hb=d60f96f0e17d751d614af28e029546d1ff003ee6;hp=abb2ed7c426e288dcb732b16b72fbc2c99c09b29;hpb=c38a5e443d42bc91355de64b9a3e4ce313e9ce47;p=friendica.git diff --git a/view/theme/frost-mobile/js/theme.js b/view/theme/frost-mobile/js/theme.js index abb2ed7c42..09b5e4d383 100644 --- a/view/theme/frost-mobile/js/theme.js +++ b/view/theme/frost-mobile/js/theme.js @@ -423,19 +423,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;