From 9b94011a09685dec1b1b38fef8294c6ffa578079 Mon Sep 17 00:00:00 2001 From: Ugnich Anton Date: Tue, 23 Oct 2012 01:44:58 +0700 Subject: JS/CSS optimization --- web/scripts3.js | 64 +++++++++++++++++++++++++++++++-------------------------- 1 file changed, 35 insertions(+), 29 deletions(-) (limited to 'web/scripts3.js') diff --git a/web/scripts3.js b/web/scripts3.js index 13686067..853734ed 100644 --- a/web/scripts3.js +++ b/web/scripts3.js @@ -2,12 +2,13 @@ function inlinevideo(mid) { var flashvars={ file:'http://i.juick.com/video/'+mid+'.mp4', image:'http://i.juick.com/thumbs/'+mid+'.jpg', - skin:'http://static.juick.com/glow.zip' + skin:'http://static.juick.com/glow.zip', + autostart:'true' }; var params={ allowfullscreen:'true' }; - swfobject.embedSWF('http://static.juick.com/player.swf','video-'+mid,'640','390','9.0.115','false',flashvars,params,null); + swfobject.embedSWF('http://static.juick.com/player.swf','video-'+mid,'512','384','9.0.115','false',flashvars,params,null); } function postformListener(formEl,ev) { @@ -62,33 +63,6 @@ function unfoldReply() { } } -$(document).ready(function() { - var tareply=$('textarea.reply'); - tareply.autoResize({ - extraSpace: 0, - minHeight: 1 - }); - tareply.click(function () { - $(this).addClass("narrow"); - $(this).after(''); - $(this).off('click'); - }); - - if(!!$('.stickya').offset()) { - var stickyTop = $('.stickya').offset().top; - $(window).scroll(function() { - var windowTop = $(window).scrollTop(); - if (stickyTop < windowTop) { - $('.stickya').css({ - position:'fixed' - }); - } else { - $('.stickya').css('position','absolute'); - } - }); - } -}); - /* * jQuery.fn.autoResize 1.14 */ @@ -364,3 +338,35 @@ $(document).ready(function() { }; })(jQuery); + +/******************************************************************************/ + +$(document).ready(function() { + var tareply=$('textarea.reply'); + tareply.autoResize({ + extraSpace: 0, + minHeight: 1 + }); + tareply.click(function () { + $(this).addClass("narrow"); + $(this).after(''); + $(this).off('click'); + }); + + if(!!$('.stickya').offset()) { + var stickyTop = $('.stickya').offset().top; + $(window).scroll(function() { + var windowTop = $(window).scrollTop(); + if (stickyTop < windowTop) { + $('.stickya').css({ + position:'fixed' + }); + } else { + $('.stickya').css('position','absolute'); + } + }); + } + + unfoldReply(); + $(window).bind('hashchange',unfoldReply); +}); -- cgit v1.2.3