Created
January 17, 2018 22:18
-
-
Save mohan-cao/e36a4166d9f292f9dbe25314129dc6a4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| if [ "$EUID" -ne 0 ] | |
| then echo "Please run as root" | |
| exit | |
| fi | |
| cd /usr/lib/slack/resources/app.asar.unpacked/src/static/ | |
| # Make sure we don't append the script multiple times | |
| if grep -Fxq "// memes are DNA of the soul" ssb-interop.js | |
| then | |
| echo "Already present xD" | |
| else | |
| echo >> ssb-interop.js | |
| echo "// memes are DNA of the soul" >> ssb-interop.js | |
| echo "document.addEventListener('DOMContentLoaded', function() {" >> ssb-interop.js | |
| echo " const emojiSize = 'https://gist.githubusercontent.com/Nateeo/7628c5c226f6b2a7f76935599307d64f/raw/jumbo-emojis.css';" >> ssb-interop.js | |
| echo " Promise.all([emojiSize].map((file) => {" >> ssb-interop.js | |
| echo " return fetch(file).then((response) => {" >> ssb-interop.js | |
| echo " return response.text();" >> ssb-interop.js | |
| echo " });" >> ssb-interop.js | |
| echo " })).then((files) => {" >> ssb-interop.js | |
| echo " \$('<style></style>').appendTo('head').html(files.join('\n'));" >> ssb-interop.js | |
| echo " });" >> ssb-interop.js | |
| echo "});" >> ssb-interop.js | |
| fi | |
| kill -KILL $(pgrep -f slack) | |
| slack |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment