Remove support for non-native emoji rendering
It's not 2014 anymore, every reasonable platform supports displaying emoji natively these days. Let's remove a filter that has ceased to provide value.
This commit is contained in:
parent
88b14248f7
commit
724b2c6e93
@ -693,21 +693,6 @@ li.buffer.indent.private a {
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.emojione {
|
||||
font-size: inherit;
|
||||
height: 1em;
|
||||
width: 1.1em;
|
||||
min-height: 16px;
|
||||
min-width: 16px;
|
||||
display: inline-block;
|
||||
margin: -.2ex .15em .2ex;
|
||||
line-height: normal;
|
||||
vertical-align: middle;
|
||||
}
|
||||
img.emojione {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
#toast {
|
||||
position: fixed;
|
||||
left: 50%;
|
||||
|
@ -9,7 +9,6 @@ bower:
|
||||
copylocal:
|
||||
find bower_components \( -name "*min.js" -o -name "*min.css" \) -exec cp {} 3rdparty \;
|
||||
cp -r bower_components/bootstrap/fonts .
|
||||
cp bower_components/emojione/assets/sprites/emojione.sprites.svg 3rdparty
|
||||
|
||||
# modify index.html to use local files
|
||||
uselocal: copylocal
|
||||
|
12
index.html
12
index.html
@ -415,7 +415,7 @@ npm run build-electron-{windows, darwin, linux}</pre>
|
||||
<td class="prefix"><span ng-class="::{'repeated-prefix': bufferline.prefixtext==bufferlines[$index-1].prefixtext}"><a ng-click="addMention(bufferline)"><span class="hidden-bracket" ng-if="::(bufferline.showHiddenBrackets)"><</span><span ng-repeat="part in ::bufferline.prefix" ng-class="::part.classes" ng-bind="::part.text|prefixlimit:25"></span><span class="hidden-bracket" ng-if="::(bufferline.showHiddenBrackets)">></span></a></span></td><!--
|
||||
--><td class="message"><!--
|
||||
--><div ng-repeat="metadata in ::bufferline.metadata" plugin data="::metadata"></div><!--
|
||||
--><span ng-repeat="part in ::bufferline.content" class="text" ng-class="::part.classes.concat(['line-' + part.$$hashKey.replace(':','_')])" ng-bind-html="::part.text | conditionalLinkify:part.classes.includes('cof-chat_host') | DOMfilter:'codify' | DOMfilter:'irclinky' | DOMfilter:'emojify':settings.enableJSEmoji | DOMfilter:'inlinecolour' | DOMfilter:'latexmath':('.line-' + part.$$hashKey.replace(':','_')):settings.enableMathjax"></span>
|
||||
--><span ng-repeat="part in ::bufferline.content" class="text" ng-class="::part.classes.concat(['line-' + part.$$hashKey.replace(':','_')])" ng-bind-html="::part.text | conditionalLinkify:part.classes.includes('cof-chat_host') | DOMfilter:'codify' | DOMfilter:'irclinky' | DOMfilter:'inlinecolour' | DOMfilter:'latexmath':('.line-' + part.$$hashKey.replace(':','_')):settings.enableMathjax"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="readmarker" ng-if="activeBuffer().lastSeen==$index">
|
||||
@ -590,16 +590,6 @@ npm run build-electron-{windows, darwin, linux}</pre>
|
||||
</div>
|
||||
</form>
|
||||
</li>
|
||||
<li>
|
||||
<form class="form-inline" role="form">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" ng-model="settings.enableJSEmoji">
|
||||
Enable non-native Emoji support <span class="text-muted settings-help">Displays Emoji characters as images. Emoji provided free by <a href="http://emojione.com">http://emojione.com</a></span>
|
||||
</label>
|
||||
</div>
|
||||
</form>
|
||||
</li>
|
||||
<li>
|
||||
<form class="form-inline" role="form">
|
||||
<div class="checkbox">
|
||||
|
@ -184,24 +184,6 @@ weechat.filter('getBufferQuickKeys', function () {
|
||||
};
|
||||
});
|
||||
|
||||
// Emojifis the string using https://github.com/Ranks/emojione
|
||||
weechat.filter('emojify', function() {
|
||||
return function(text, enable_JS_Emoji) {
|
||||
if (enable_JS_Emoji === true && window.emojione !== undefined) {
|
||||
// Emoji live in the D800-DFFF surrogate plane; only bother passing
|
||||
// this range to CPU-expensive unicodeToImage();
|
||||
var emojiRegex = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
|
||||
if (emojiRegex.test(text)) {
|
||||
return emojione.unicodeToImage(text);
|
||||
} else {
|
||||
return(text);
|
||||
}
|
||||
} else {
|
||||
return(text);
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
weechat.filter('latexmath', function() {
|
||||
return function(text, selector, enabled) {
|
||||
if (!enabled || typeof(katex) === "undefined") {
|
||||
|
@ -59,7 +59,6 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
|
||||
'fontsize': '14px',
|
||||
'fontfamily': (utils.isMobileUi() ? 'sans-serif' : 'Inconsolata, Consolas, Monaco, Ubuntu Mono, monospace'),
|
||||
'readlineBindings': false,
|
||||
'enableJSEmoji': !utils.isMobileUi(),
|
||||
'enableMathjax': false,
|
||||
'enableQuickKeys': true,
|
||||
'customCSS': '',
|
||||
@ -119,13 +118,6 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
|
||||
(["localhost", "127.0.0.1", "::1"].indexOf(window.location.hostname) === -1) &&
|
||||
!window.is_electron && !utils.isCordova();
|
||||
|
||||
if (window.is_electron) {
|
||||
// Use packaged emojione sprite in the electron app
|
||||
emojione.imageType = 'svg';
|
||||
emojione.sprites = true;
|
||||
emojione.imagePathSVGSprites = './3rdparty/emojione.sprites.svg';
|
||||
}
|
||||
|
||||
$rootScope.isWindowFocused = function() {
|
||||
if (typeof $scope.documentHidden === "undefined") {
|
||||
// Page Visibility API not supported, assume yes
|
||||
|
Loading…
Reference in New Issue
Block a user