diff --git a/css/glowingbear.css b/css/glowingbear.css index bda2406..4b764ef 100644 --- a/css/glowingbear.css +++ b/css/glowingbear.css @@ -539,12 +539,19 @@ li.buffer.indent.private a { user-select: none; } -/* Scales emoji to font size */ -img.emoji { - height: 1em; - width: 1em; - margin: 0 .05em 0 .1em; - vertical-align: -0.1em; +.emojione { + font-size: inherit; + height: 3ex; + width: 3.1ex; + min-height: 20px; + min-width: 20px; + display: inline-block; + margin: -.2ex .15em .2ex; + line-height: normal; + vertical-align: middle; +} +img.emojione { + width: auto; } @media (min-width: 1400px) { diff --git a/js/filters.js b/js/filters.js index 9317af4..0e1246d 100644 --- a/js/filters.js +++ b/js/filters.js @@ -141,11 +141,11 @@ weechat.filter('getBufferQuickKeys', function () { }; }); -// Emojifis the string using https://github.com/twitter/twemoji +// Emojifis the string using https://github.com/Ranks/emojione weechat.filter('emojify', function() { return function(text, enable_JS_Emoji) { if (enable_JS_Emoji === true) { - return twemoji.parse(text); + return emojione.unicodeToImage(text); } else { return(text); } diff --git a/js/glowingbear.js b/js/glowingbear.js index 83be41b..210900e 100644 --- a/js/glowingbear.js +++ b/js/glowingbear.js @@ -385,17 +385,17 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout', } }); - // To reduce loading times for users who don't want twemoji, + // To reduce loading times for users who don't want emojione, // load it only if the setting is enabled. // This also fires when the page is loaded. settings.addCallback('enableJSEmoji', function(enabled) { if (enabled && !$rootScope.twemoji_init) { - // Load twemoji only once + // Load script only once $rootScope.twemoji_init = true; (function() { var script = document.createElement("script"); script.type = "text/javascript"; - script.src = "//twemoji.maxcdn.com/twemoji.min.js"; + script.src = "//cdn.jsdelivr.net/emojione/1.3.0/lib/js/emojione.min.js"; document.getElementsByTagName("head")[0].appendChild(script); })(); }