-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathonload.js
More file actions
31 lines (31 loc) · 1.11 KB
/
onload.js
File metadata and controls
31 lines (31 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
var cssstyle="<style>"+
".stream-container .media-thumbnail,.stream-container .animated-gif-thumbnail,.stream-container .js-media-container{"+
"max-height: 10px !important;overflow: hidden;content:'';"+
"height: 10px;width: 100%;background: #BBB;"+
"}"+
".stream-container .media-thumbnail img,.stream-container .animated-gif-thumbnail img{"+
"display:none;"+
"}"+
"</style>";
$(document).ready(function(){
$('body').append(cssstyle);
$('.expanding-stream-item').live('click',function(){
if($(this).hasClass('open')){
$(this).find('.media-thumbnail,.animated-gif-thumbnail').css({
'max-height':'inherit','overflow':'inherit',
'height': 'inherit','width': 'inherit','background': 'inherit'
});
$(this).find('.media-thumbnail img,.animated-gif-thumbnail img').css({
'display': 'block'
});
}else{
$(this).find('.media-thumbnail,.animated-gif-thumbnail').css({
'max-height':'10px','overflow':'hidden',
'height': '10px','width': '100%','background': '#BBB'
});
$(this).find('.media-thumbnail img,.animated-gif-thumbnail img').css({
'display': 'none'
});
}
});
});