]> git.mxchange.org Git - friendica.git/blobdiff - view/theme/quattro/js/quattro.js
Merge branch 'friendica:2022.12-rc' into new_image_presentation
[friendica.git] / view / theme / quattro / js / quattro.js
index 9ef66e220e42b4139e5cf2cb3668f3583b94d165..e91794febad852969d2b6736d95692e9f03a7dba 100644 (file)
@@ -1,8 +1,9 @@
+// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPLv3-or-later
 $(document).ready(function(){
        $('nav').bind('nav-update', function(e,data){
                var notifCount = $(data).find('notif').attr('count');
-               var intro = $(data).find('intro').text();
-               var mail = $(data).find('mail').text();
+               var intro = parseInt($(data).find('intro').text());
+               var mail = parseInt($(data).find('mail').text());
 
                $(".tool .notify").removeClass("on");
                $(data).find("group").each(function() {
@@ -59,36 +60,6 @@ $(document).ready(function(){
        });
 });
 
-function insertFormatting(BBcode, id) {
-       var tmpStr = $("#comment-edit-text-" + id).val();
-       if (tmpStr == "") {
-               $("#comment-edit-text-" + id).addClass("comment-edit-text-full");
-               $("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
-               openMenu("comment-edit-submit-wrapper-" + id);
-       }
-
-       textarea = document.getElementById("comment-edit-text-" +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+"]";
-               }
-       } 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);
-               }
-       }
-
-       return true;
-}
-
 function showThread(id) {
        $("#collapsed-comments-" + id).show()
        $("#collapsed-comments-" + id + " .collapsed-comments").show()
@@ -147,4 +118,4 @@ $(document).ready(function() {
 
 });
 
-
+// @license-end