//屏蔽鼠标右键 var jsArgument = document.getElementsByTagName("script")[document.getElementsByTagName("script").length-1].src; //获取传递的参数 rightButton = jsArgument.substr(jsArgument.indexOf("rightButton=") + "rightButton=".length, 1); if (rightButton == "1"){ document.oncontextmenu = function(e){return false;} document.onselectstart = function(e){return false;} if (navigator.userAgent.indexOf("Firefox") > 0){ document.writeln(""); } } // 手机站自动跳转 mobilejump = jsArgument.substr(jsArgument.indexOf("mobilejump=") + "mobilejump=".length, 1); if (mobilejump == "1"){ var sUserAgent = navigator.userAgent.toLowerCase(); var bIsIpad = sUserAgent.match(/ipad/i) == "ipad"; var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os"; var bIsMidp = sUserAgent.match(/midp/i) == "midp"; var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4"; var bIsUc = sUserAgent.match(/ucweb/i) == "ucweb"; var bIsAndroid = sUserAgent.match(/android/i) == "android"; var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce"; var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile"; if (bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM) { var url = location.href; var mes = url.indexOf("?"); var mes2 = url.indexOf("="); var a = url.substring(mes+1); var b = url.substring(mes+1); var c = url.substring(mes+1); var d = url.substring(mes2+1); var display = url.indexOf("/display"); var info = url.indexOf("info"); var hr_display = url.indexOf("hr_display"); if(display!=-1){ window.location.href = "/m/display.php?"+a; }else if(info!=-1){ window.location.href = "/m/info.php?"+b; }else if(hr_display!=-1){ window.location.href = "/m/job.php?"+c; }else{ window.location.href = "/m/index.php"; } } } // 设为首页 function setHome(obj, vrl){ try{ obj.style.behavior='url(#default#homepage)'; obj.setHomePage(vrl); }catch(e){ if(window.netscape){ try{ netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); }catch (e){ alert("此操作被浏览器拒绝!\n请在浏览器地址栏输入“about:config”并回车\n然后将[signed.applets.codebase_principal_support]的值设置为'true',双击即可。"); return; } var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch); prefs.setCharPref('browser.startup.homepage', vrl); }else{ alert("抱歉,您所使用的浏览器无法完成此操作。\n\n您需要手动将【"+vrl+"】设置为首页。"); } } } // 加入收藏 function addFavorite(sURL, sTitle){ try{ window.external.addFavorite(sURL, sTitle); }catch (e){ try{ window.sidebar.addPanel(sTitle, sURL, ""); }catch (e){ alert("您使用的浏览器不支持此功能,请使用Ctrl+D进行添加"); } } } // 保存到桌面 function toDesktop(sUrl,sName){ try { var WshShell = new ActiveXObject("WScript.Shell"); var oUrlLink = WshShell.CreateShortcut(WshShell.SpecialFolders("Desktop") + "\\" + sName + ".url"); oUrlLink.TargetPath = sUrl; oUrlLink.Save(); }catch(e){ alert("当前IE安全级别不允许操作!"); } } // 浏览器版本 $(function(){ var DEFAULT_VERSION = "8.0"; var ua = navigator.userAgent.toLowerCase(); var isIE = ua.indexOf("msie")>-1; var safariVersion; if(isIE){ safariVersion = ua.match(/msie ([\d.]+)/)[1]; if(safariVersion <= DEFAULT_VERSION ){ $("body").append("
您当前使用的IE浏览器版本过低,为了您的浏览体验,建议您升级到 IE9+ 或者使用 firefox , chrome 最新版本!X
"); } } }) // 回到顶部 $(document).ready(function(){ $(window).scroll(function(){ var scrollH = $(window).scrollTop(); if(scrollH>300){ $(".back-to").fadeIn(); }else{ $(".back-to").fadeOut(); } }) $(".back-to").on('click',function(){ $('html,body').animate({'scrollTop':0},500); }); }) // 在线QQ $(function(){ var m_woo_panel = $('#m-woo-panel'); $('#j-close').on('click',function(){ m_woo_panel.hide(); }); $('#j-console').on("click",function(){ if($(this).hasClass("m-console-active")){ $(this).removeClass("m-console-active"); m_woo_panel.animate({right:0}); }else{ $(this).addClass("m-console-active"); m_woo_panel.animate({right:-164}); }; }); }); // QQ滚动特效 $(document).ready(function(){ $(".online_qq").floatadv(); }); jQuery.fn.floatadv = function(loaded) { var obj = this; body_height = parseInt($(window).height()); block_height = parseInt(obj.height()); top_position = parseInt((body_height/2) - (block_height/2) + $(window).scrollTop()); if (body_height