Skip to content
Permalink
Browse files

Update for Slack client 3.3.1

  • Loading branch information...
quantum5 committed Sep 20, 2018
1 parent 6173a9f commit 456264166a8196bd9e7c17225d44b01c9a39711a
Showing with 14 additions and 8 deletions.
  1. +4 −2 README.md
  2. +5 −3 old-slack-emojis.bat
  3. +5 −3 old-slack-emojis.sh
@@ -3,7 +3,9 @@
Bring back old emojis to new Slack!

## What is this?
In February 2018, Slack pushed a change making Google emojis used on all platforms, instead of the older Apple emojis.
In February 2018, Slack pushed a change making Google emojis used on all platforms except macOS, instead of the older Apple emojis.

On macOS, emojis have been instead switched to the newer iOS 10.2 style, instead of the original iOS 6 style.

### Before change

@@ -13,7 +15,7 @@ In February 2018, Slack pushed a change making Google emojis used on all platfor

![](https://i.imgur.com/46NPVv2.png)

This patch reverses this change, and brings back the loveable Apple emojis to new Slack clients.
This patch reverses this change, and brings back the loveable classic Apple emojis to new Slack clients.

## Installation
Installation varies depending on if you're using the Slack webapp or desktop client. A patch for mobile app versions of Slack is not
@@ -71,7 +71,7 @@ IF "%UNINSTALL%" == "-u" (

>"%SLACK_DIR%\old-slack-emojis.js" (
ECHO.var emojiStyle = document.createElement('style'^);
ECHO.emojiStyle.innerText = ".emoji-outer { background-image: url('https://old-slack-emojis.cf/cdn/slack_2016_apple_sprite_64.png') !important; }";
ECHO.emojiStyle.innerText = ".emoji-outer, #msg_input .emoji[style*=_indexed_] { background-image: url('https://old-slack-emojis.cf/cdn/slack_2016_apple_sprite_64.png') !important; }";
ECHO.document.head.appendChild(emojiStyle^);
)

@@ -128,8 +128,10 @@ IF NOT EXIST "%~1.osebak" (
>>"%~1" (
ECHO.
ECHO.// ** old-slack-emojis ** https://github.com/IvyBits/old-slack-emojis
ECHO.var scriptPath = path.join(__dirname, 'old-slack-emojis.js'^).replace('app.asar', 'app.asar.unpacked'^);
ECHO.require('fs'^).readFile(scriptPath, 'utf8', (e, r^) =^> { if (e^) { throw e; } else { eval(r^); } }^);
ECHO.if (window.location.href !== 'about:blank'^) {
ECHO. const scriptPath = require('path'^).join(__dirname, 'old-slack-emojis.js'^).replace('app.asar', 'app.asar.unpacked'^);
ECHO. require('fs'^).readFile(scriptPath, 'utf8', (e, r^) =^> { if (e^) { throw e; } else { eval(r^); } }^);
ECHO.}
)

EXIT /B 0
@@ -100,7 +100,7 @@ fi

cat <<EOF > $SLACK_DIR/old-slack-emojis.js
var emojiStyle = document.createElement('style');
emojiStyle.innerText = ".emoji-outer { background-image: url('https://old-slack-emojis.cf/cdn/slack_2016_apple_sprite_64.png') !important; }";
emojiStyle.innerText = ".emoji-outer, #msg_input .emoji[style*=_indexed_] { background-image: url('https://old-slack-emojis.cf/cdn/slack_2016_apple_sprite_64.png') !important; }";
document.head.appendChild(emojiStyle);
EOF

@@ -123,8 +123,10 @@ inject_loader() {
# Inject loader code
echo "" >> $1
echo "// ** old-slack-emojis ** https://github.com/IvyBits/old-slack-emojis" >> $1
echo "var scriptPath = path.join(__dirname, 'old-slack-emojis.js').replace('app.asar', 'app.asar.unpacked');" >> $1
echo "require('fs').readFile(scriptPath, 'utf8', (e, r) => { if (e) { throw e; } else { eval(r); } });" >> $1
echo "if (window.location.href !== 'about:blank') {" >> $1
echo " const scriptPath = require('path').join(__dirname, 'old-slack-emojis.js').replace('app.asar', 'app.asar.unpacked');" >> $1
echo " require('fs').readFile(scriptPath, 'utf8', (e, r) => { if (e) { throw e; } else { eval(r); } });" >> $1
echo "}" >> $1
}

inject_loader $SLACK_DIR/ssb-interop.js

0 comments on commit 4562641

Please sign in to comment.
You can’t perform that action at this time.