Skip to content
This repository has been archived by the owner on Apr 12, 2023. It is now read-only.

Commit

Permalink
Revert "Don't use emoji png from internet"
Browse files Browse the repository at this point in the history
This reverts commit 7483ad2.

The emoji png is too large and increases our binary size a lot.
  • Loading branch information
zcbenz committed Dec 25, 2018
1 parent 931499f commit 8c26a87
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 6 deletions.
5 changes: 0 additions & 5 deletions lib/view/chat-box.js
Original file line number Diff line number Diff line change
Expand Up @@ -356,16 +356,11 @@ handlebars.registerHelper('fontStyle', function() {
return fontStyle
})

// Path to the emoji png.
const emojiPng = fs.realpathSync(path.resolve(__dirname, 'chat', 'sheet_apple_64_indexed_256.png'))

// Register wey:// protocol to work around CROS problem with file:// protocol.
gui.Browser.registerProtocol('wey', (u) => {
const r = url.parse(u)
if (r.host !== 'file')
return gui.ProtocolStringJob.create('text/plain', 'Unsupported type')
if (r.path == '/emoji.png')
return gui.ProtocolFileJob.create(emojiPng)
const query = querystring.parse(r.query)
return gui.ProtocolFileJob.create(query.path)
})
Expand Down
2 changes: 1 addition & 1 deletion lib/view/chat/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
vertical-align: middle;
}
.apple.emoji {
background-image: url(wey://file/emoji.png);
background-image: url(https://a.slack-edge.com/c00d19/img/emoji_2017_12_06/sheet_apple_64_indexed_256.png);
background-size: 5200% 5200%;
}
.custom.emoji {
Expand Down
Binary file removed lib/view/chat/sheet_apple_64_indexed_256.png
Binary file not shown.

0 comments on commit 8c26a87

Please # to comment.