Created
July 22, 2015 01:29
-
-
Save karlding/f6c5063142a9803cbb55 to your computer and use it in GitHub Desktop.
Hide media previews (video and images) in the HipChat web client
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 HipChat Hide Media Previews | |
// @namespace github.com/karlding | |
// @version 0.1.0 | |
// @description Hide Media Previews (video and images) in the HipChat web client | |
// @author Karl Ding | |
// @match https://*.hipchat.com/chat/* | |
// @license MIT | |
// ==/UserScript== | |
var css = '.video-wrap {visibility: hidden;}\n.hc-chat-row:hover .video-wrap {visibility:visible;}\n.hc-chat-row .image-preview-wrapper {visibility:hidden;}\n.hc-chat-row:hover .image-preview-wrapper {visibility:visible}', | |
head = document.head || document.getElementsByTagName('head')[0], | |
style = document.createElement('style'); | |
style.type = 'text/css'; | |
if (style.styleSheet){ | |
style.styleSheet.cssText = css; | |
} else { | |
style.appendChild(document.createTextNode(css)); | |
} | |
head.appendChild(style); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment