Merge pull request #1127 from glowing-bear/remove-nonnative-emoji
Remove support for non-native emoji rendering
This commit is contained in:
commit
16755b5370
@ -693,21 +693,6 @@ li.buffer.indent.private a {
|
|||||||
user-select: none;
|
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 {
|
#toast {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
|
@ -9,7 +9,6 @@ bower:
|
|||||||
copylocal:
|
copylocal:
|
||||||
find bower_components \( -name "*min.js" -o -name "*min.css" \) -exec cp {} 3rdparty \;
|
find bower_components \( -name "*min.js" -o -name "*min.css" \) -exec cp {} 3rdparty \;
|
||||||
cp -r bower_components/bootstrap/fonts .
|
cp -r bower_components/bootstrap/fonts .
|
||||||
cp bower_components/emojione/assets/sprites/emojione.sprites.svg 3rdparty
|
|
||||||
|
|
||||||
# modify index.html to use local files
|
# modify index.html to use local files
|
||||||
uselocal: copylocal
|
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="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"><!--
|
--><td class="message"><!--
|
||||||
--><div ng-repeat="metadata in ::bufferline.metadata" plugin data="::metadata"></div><!--
|
--><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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="readmarker" ng-if="activeBuffer().lastSeen==$index">
|
<tr class="readmarker" ng-if="activeBuffer().lastSeen==$index">
|
||||||
@ -590,16 +590,6 @@ npm run build-electron-{windows, darwin, linux}</pre>
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</li>
|
</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>
|
<li>
|
||||||
<form class="form-inline" role="form">
|
<form class="form-inline" role="form">
|
||||||
<div class="checkbox">
|
<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() {
|
weechat.filter('latexmath', function() {
|
||||||
return function(text, selector, enabled) {
|
return function(text, selector, enabled) {
|
||||||
if (!enabled || typeof(katex) === "undefined") {
|
if (!enabled || typeof(katex) === "undefined") {
|
||||||
|
@ -59,7 +59,6 @@ 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': !utils.isMobileUi(),
|
|
||||||
'enableMathjax': false,
|
'enableMathjax': false,
|
||||||
'enableQuickKeys': true,
|
'enableQuickKeys': true,
|
||||||
'customCSS': '',
|
'customCSS': '',
|
||||||
@ -119,13 +118,6 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
|
|||||||
(["localhost", "127.0.0.1", "::1"].indexOf(window.location.hostname) === -1) &&
|
(["localhost", "127.0.0.1", "::1"].indexOf(window.location.hostname) === -1) &&
|
||||||
!window.is_electron && !utils.isCordova();
|
!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() {
|
$rootScope.isWindowFocused = function() {
|
||||||
if (typeof $scope.documentHidden === "undefined") {
|
if (typeof $scope.documentHidden === "undefined") {
|
||||||
// Page Visibility API not supported, assume yes
|
// Page Visibility API not supported, assume yes
|
||||||
|
Loading…
Reference in New Issue
Block a user