Skip to content

Instantly share code, notes, and snippets.

@YTsuda
Last active February 2, 2016 01:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save YTsuda/a76d4f6da5a02f5df281 to your computer and use it in GitHub Desktop.
Save YTsuda/a76d4f6da5a02f5df281 to your computer and use it in GitHub Desktop.
You can hide and open "CHANNELS" on Slack. It's a Tempermoneky script.
// ==UserScript==
// @name SlackChannelHide
// @namespace http://howtelevision.co.jp/
// @version 0.1
// @description You can hide and open "CHANNELS" on Slack.
// @author YasuyukiTsuda
// @match https://*.slack.com/*
// @require https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js
// @run-at document-end
// @grant unsafeWindow
// ==/UserScript==
$("#channel-list").after('<a href="#" id="open-channel-list" class="list_more">open...</a>');
$("#channel-list").after('<a href="#" id="close-channel-list" class="list_more">close</a>');
$("#channel-list").hide();
$("#close-channel-list").hide();
$("#open-channel-list").click(function(e){
e.preventDefault();
$("#channel-list").show("fast");
$("#close-channel-list").show();
$("#open-channel-list").hide();
});
$("#close-channel-list").click(function(e){
e.preventDefault();
$("#channel-list").hide("fast");
$("#close-channel-list").hide();
$("#open-channel-list").show();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment