Skip to content

Instantly share code, notes, and snippets.

@DerrikMilligan
Last active August 9, 2018 15:51
Show Gist options
  • Save DerrikMilligan/c1b8c842ee6d6afb3d94477e8c8868c9 to your computer and use it in GitHub Desktop.
Save DerrikMilligan/c1b8c842ee6d6afb3d94477e8c8868c9 to your computer and use it in GitHub Desktop.

Inspired by: https://gist.github.com/protoEvangelion/4f9d8c3b2f8471e7037a985602cd8a19

Installing into Slack

Find your Slack's application directory.

  • Windows: %homepath%\AppData\Local\slack\
  • Mac: /Applications/Slack.app/Contents/
  • Linux: /usr/lib/slack/ (Debian-based)

Open up the most recent version (e.g. app-2.5.1) then open resources\app.asar.unpacked\src\static\index.js

For versions after and including 3.0.0 the same code must be added to the following file resources\app.asar.unpacked\src\static\ssb-interop.js

At the very bottom, add

document.addEventListener('DOMContentLoaded', function() {
  const stylesheets = [
    'https://gist.githubusercontent.com/DerrikMilligan/df3dd3015d3811f0d7bbaaeb8e9a1288/raw',
    'https://gist.githubusercontent.com/DerrikMilligan/f2980689d0ae404b240240db0ad50ed4/raw'
  ];
  stylesheets.forEach(function(url) {
    $.ajax({
      url: url,
      success: function(css) {
        $("<style></style>").appendTo('head').html(css);
      }
    });
  });
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment