Last active
March 12, 2018 13:17
-
-
Save charleslcsantos/b0811c63a2b8560537bdfaf1c9bf2477 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
// Código em parceria com @jroqueweb @raphaelfruneaux | |
function cssEngine(rule) { | |
var css = document.createElement('style'); // Creates <style></style> | |
css.type = 'text/css'; // Specifies the type | |
if (css.styleSheet) css.styleSheet.cssText = rule; // Support for IE | |
else css.appendChild(document.createTextNode(rule)); // Support for the rest | |
document.getElementsByTagName("head")[0].appendChild(css); // Specifies where to place the css | |
} | |
cssEngine(".message.message-image img, .message.message-gif > div > div div:nth-child(2), .message.message-gif > div > div > div:nth-child(2), .message.message-video .video-thumb, .message-in img:not(.selectable-text), .message-in .video-thumb, .message-out img:not(.selectable-text), .message-out .video-thumb {opacity: .2; filter: blur(5px); transition: all ease .2s;} | |
"); | |
cssEngine(".message.message-image:hover img, .message.message-gif:hover > div > div div:nth-child(2), .message.message-gif:hover > div > div > div:nth-child(2), .message.message-video:hover .video-thumb, .message-in:hover img:not(.selectable-text), .message-in .video-thumb:hover, .message-out:hover img:not(.selectable-text), .message-out .video-thumb:hover {opacity: 1; filter: blur(0); transition: all ease .1s;}"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@charleslcsantos I forked your gist and updated it. Now it hides video thumbs. You can see these changes here.