Merge pull request #566 from glowing-bear/emojione

Twemoji => Emojione
This commit is contained in:
Lorenz Hübschle-Schneider 2015-03-22 13:14:48 +01:00
commit 399b3af9f4
6 changed files with 23 additions and 26 deletions

View file

@ -36,7 +36,7 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
'fontsize': '14px',
'fontfamily': (utils.isMobileUi() ? 'sans-serif' : 'Inconsolata, Consolas, Monaco, Ubuntu Mono, monospace'),
'readlineBindings': false,
'enableJSEmoji': false,
'enableJSEmoji': (utils.isMobileUi() ? false : true),
'enableMathjax': false,
});
$scope.settings = settings;
@ -385,22 +385,6 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
}
});
// To reduce loading times for users who don't want twemoji,
// 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
$rootScope.twemoji_init = true;
(function() {
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "//twemoji.maxcdn.com/twemoji.min.js";
document.getElementsByTagName("head")[0].appendChild(script);
})();
}
});
// To prevent unnecessary loading times for users who don't
// want MathJax, load it only if the setting is enabled.
// This also fires when the page is loaded if enabled.