dever před 6 roky
rodič
revize
36f95c6bf2
1 změnil soubory, kde provedl 38 přidání a 0 odebrání
  1. 38 0
      h5/assets/mobile/js/emoji.js

+ 38 - 0
h5/assets/mobile/js/emoji.js

@@ -0,0 +1,38 @@
+$(document).ready(function()
+{
+	initEmoji();
+});
+
+function initEmoji()
+{
+	if ($('.p').length) {
+		$('.p').each(function()
+		{
+			emoji($(this), $(this).html());
+		})
+	}
+}
+
+function emoji(e, content)
+{
+	var handle = function()
+	{
+		e.html(twemoji.parse(content)).show(200);
+	};
+	if (typeof jEmoji != 'object') {
+		$.getScript('//twemoji.maxcdn.com/2/twemoji.min.js?11.4', function() {
+			/*
+			$("head").append("<link>");
+			var css = $("head").children(":last");
+			css.attr({
+				rel:  "stylesheet",
+				type: "text/css",
+				href: config.script + '/lib/emoji/emoji.css'
+			});
+			*/
+			return handle();
+		});
+	} else {
+		return handle();
+	}
+}