Last active
February 2, 2016 01:59
-
-
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.
This file contains 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
// ==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