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