zoom.min.js
2.12 KB
$('body').prepend('<style type="text/css">.com-zoom-flash{position:absolute;bottom:0;right:0;height:10px;width:10px;}.com-zoom-tips-hack{height:2em;display:none;}.com-zoom-warn{display:none;position:fixed;top:0;left:0;width:100%;line-height:2em;text-align:center;background-color:#ffffcc;font-size:1.2em;color:#8e0000;z-index:9999;}.com-zoom-close{float:right;width:2em;height:1.7em;line-height:1.7em;font-weight:bold;font-family:"Tahoma";color:#8e0000;text-decoration:none;}.com-zoom-close:hover{color:#d8ab57;}.com-zoom-notip{color:#3e3e3e;text-decoration:underline;}.com-zoom-notip:hover{text-decoration:none;}.com-zoom-text{margin:0;}</style><div class="com-zoom-flash"><object codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="10" height="10">'
+'<param name="movie" value="'+ctxStatic+'/flash/zoom.swf" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><embed src="'+ctxStatic+'/flash/zoom.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="10" height="10" wmode="transparent"></embed></object></div><div class="com-zoom-tips-hack"><div class="com-zoom-warn" id="com-zoom-warn"><a href="javascript:void(0);" class="com-zoom-close" title="关闭" hidefocus="true" target="_self">x</a><p class="com-zoom-text">您的浏览器目前处于缩放状态,会导致网页显示不正常,您可以键盘按“ctrl+数字0”组合键恢复初始状态。<a href="javascript:void(0);" class="com-zoom-notip" target="_self" hidefocus="true">不再提示</a></p></div></div>');
$('.com-zoom-close').click(function(){$('.com-zoom-warn').slideUp("slow");$('.com-zoom-tips-hack').hide("slow");});$('.com-zoom-notip').click(function(){cookie('zoom', 'true', {expires:30});$('.com-zoom-warn').slideUp("slow");$('.com-zoom-tips-hack').hide("slow");});
function onchange(level){if(!cookie('zoom') && (level < 1 || level >= 2)){$('.com-zoom-warn').slideDown("slow");$('.com-zoom-tips-hack').css('font-size', 12/level+'px').show("slow");}else{$('.com-zoom-warn').slideUp("slow");$('.com-zoom-tips-hack').hide("slow");}}