can3p (can3p) wrote in changelog,
can3p
can3p
changelog

[ljcom] r11060: LJSUP-9970: delete [object HTMLDivElemen...

Committer: dpetrov
LJSUP-9970: delete [object HTMLDivElement] in contextual popup
U   trunk/htdocs/js/livejournal-local.js
Modified: trunk/htdocs/js/livejournal-local.js
===================================================================
--- trunk/htdocs/js/livejournal-local.js	2011-09-30 07:15:34 UTC (rev 11059)
+++ trunk/htdocs/js/livejournal-local.js	2011-09-30 07:19:33 UTC (rev 11060)
@@ -1,39 +1,23 @@
 // ljtalk for ctxpopup
 LiveJournal.register_hook("ctxpopup_extrainfo", function (userdata) {
-    var content = document.createElement("div");
-
-    if (userdata.is_person) {
+	var content = '';
+	if (userdata.is_person) {
 		if (userdata.is_online !== null) {
-            // online status
-            var onlineStatusLabel = document.createElement("span");
-            var jabberTitle = userdata.jabber_title;
-            onlineStatusLabel.innerHTML = jabberTitle + ": ";
-            DOM.addClassName(onlineStatusLabel, "OnlineStatus");
-            content.appendChild(onlineStatusLabel);
+			content = '<a href="' + Site.siteroot + '/chat/">LJ Talk</a>';
+			if (userdata.is_online) {
+				content += " Online";
+			} else if (userdata.is_online == '0') {
+				content += " Offline";
+			}
+		}
+	}
 
-            // build status
-            var onlineStatus = document.createElement("span");
-
-
-            var onlineStatusText = document.createElement("span");
-            onlineStatus.appendChild(onlineStatusText);
-
-            content.appendChild(onlineStatus);
-
-            if (userdata.is_online) {
-                onlineStatusText.innerHTML = "Online";
-            } else if (userdata.is_online == '0') {
-                onlineStatusText.innerHTML = "Offline";
-            }
-        }
-    }
-
-    return content;
+	return content;
 });
 
 // for updating ljcom widgets from livejournal ones
 LiveJournal.register_hook("update_other_widgets", function (from_widget) {
-    if (from_widget == "LayoutChooser" && Customize.AdLayout) {
-        Customize.AdLayout.updateContent();
-    }
+	if (from_widget == "LayoutChooser" && Customize.AdLayout) {
+		Customize.AdLayout.updateContent();
+	}
 });

Tags: can3p, js, ljcom
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments