Enable by default, except on mobile. Convert by default.
This commit is contained in:
parent
f042f729e1
commit
99ccd551b6
|
@ -541,10 +541,10 @@ li.buffer.indent.private a {
|
||||||
|
|
||||||
.emojione {
|
.emojione {
|
||||||
font-size: inherit;
|
font-size: inherit;
|
||||||
height: 3ex;
|
height: 1em;
|
||||||
width: 3.1ex;
|
width: 1.1em;
|
||||||
min-height: 20px;
|
min-height: 16px;
|
||||||
min-width: 20px;
|
min-width: 16px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin: -.2ex .15em .2ex;
|
margin: -.2ex .15em .2ex;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<form class="form form-horizontal" id="inputform" ng-submit="sendMessage()">
|
<form class="form form-horizontal" id="inputform" ng-submit="sendMessage()">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<textarea id="{{inputId}}" class="form-control favorite-font" ng-trim="false" rows="1" autocomplete="on" ng-model="command" ng-focus="hideSidebar()">
|
<textarea id="{{inputId}}" class="form-control favorite-font" ng-trim="false" rows="1" ng-change="inputChanged()" autocomplete="on" ng-model="command" ng-focus="hideSidebar()">
|
||||||
</textarea>
|
</textarea>
|
||||||
<span class="input-group-btn">
|
<span class="input-group-btn">
|
||||||
<button class="btn btn-default btn-primary unselectable">Send</button>
|
<button class="btn btn-default btn-primary unselectable">Send</button>
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
<script type="text/javascript" src="js/websockets.js"></script>
|
<script type="text/javascript" src="js/websockets.js"></script>
|
||||||
<script type="text/javascript" src="js/models.js"></script>
|
<script type="text/javascript" src="js/models.js"></script>
|
||||||
<script type="text/javascript" src="js/plugins.js"></script>
|
<script type="text/javascript" src="js/plugins.js"></script>
|
||||||
|
<script src="//cdn.jsdelivr.net/emojione/1.3.0/lib/js/emojione.min.js"></script>
|
||||||
<script type="text/javascript" src="3rdparty/favico-0.3.5.min.js"></script>
|
<script type="text/javascript" src="3rdparty/favico-0.3.5.min.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body ng-controller="WeechatCtrl" ng-keydown="handleKeyPress($event)" ng-keyup="handleKeyRelease($event)" ng-keypress="handleKeyPress($event)" ng-class="{'no-overflow': connected}" lang="en-US">
|
<body ng-controller="WeechatCtrl" ng-keydown="handleKeyPress($event)" ng-keyup="handleKeyRelease($event)" ng-keypress="handleKeyPress($event)" ng-class="{'no-overflow': connected}" lang="en-US">
|
||||||
|
|
|
@ -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.
|
||||||
|
|
|
@ -23,6 +23,11 @@ weechat.directive('inputBar', function() {
|
||||||
IrcUtils,
|
IrcUtils,
|
||||||
settings) {
|
settings) {
|
||||||
|
|
||||||
|
// E.g. Turn :smile: into the unicode equivalent
|
||||||
|
$scope.inputChanged = function() {
|
||||||
|
$scope.command = emojione.shortnameToUnicode($scope.command);
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Returns the input element
|
* Returns the input element
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue