You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
895 lines
55 KiB
895 lines
55 KiB
<!DOCTYPE html>
|
|
<!-- saved from url=(0671)https://pos.baidu.com/s?hei=36&wid=286&di=u3486002<u=https%3A%2F%2Fblog.csdn.net%2Fyzhang6_10%2Farticle%2Fdetails%2F77104211&psi=0b0d4a5d202c24b3daef303051291838&chi=1&tlm=1551861907&dc=3&psr=1920x1080&cja=false&ti=FFmpeg%E7%BC%96%E8%AF%91%E9%80%89%E9%A1%B9%E8%AF%A6%E8%A7%A3%20-%20%E6%B2%A1%E6%9C%89%E6%9C%80%E5%A5%BD%EF%BC%8C%E5%8F%AA%E6%9C%89%E6%9B%B4%E5%A5%BD%EF%BC%81%20-%20CSDN%E5%8D%9A%E5%AE%A2<r=https%3A%2F%2Fwww.google.com%2F&cfv=0&pss=1277x8546&cmi=4&ant=0&dai=4&tpr=1551861907252&dtm=HTML_POST&dri=0&cec=UTF-8&ps=723x534&exps=111000,110011&ari=2&dis=0&prot=2&cdo=-1&drs=1&ccd=24&col=zh-CN&tcn=1551861907&pis=-1x-1&cce=true&cpl=3&pcs=1166x773&par=1920x1040 -->
|
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<meta name="template-name" content="baiduCustITagLinkUnitRankCol">
|
|
|
|
<title>百度网盟推广</title>
|
|
<!-- 0|0 -->
|
|
<style type="text/css">
|
|
html{color:#000;background-color:transparent;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0}table{border-collapse:collapse;border-spacing:0}fieldset,img{border:0}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal}ol,ul{list-style:none}caption,th{text-align:left}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal}q:before,q:after{content:''}abbr,acronym{border:0;font-variant:normal}sup{vertical-align:text-top}sub{vertical-align:text-bottom}input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit}input,textarea,select{*font-size:100%}legend{color:#000}body{margin:0;padding:0;}
|
|
.bd-logo,.bd-logo2,.bd-logo3,.bd-logo4{
|
|
text-decoration:none;
|
|
cursor:pointer;
|
|
display:block;
|
|
overflow:hidden;
|
|
position:absolute;
|
|
bottom:0;
|
|
right:0;
|
|
z-index:2147483647;
|
|
width: 34px;
|
|
height: 10px;
|
|
background: url(//cpro2.baidustatic.com/cpro/ui/noexpire/img/2.0.1/new-logo@2x.png);
|
|
background-color: rgba(0,0,0,0.6);
|
|
background-size: 100% 100%;
|
|
}
|
|
.bd-logo4{height:18px;width:18px;bottom:0;left:0;background:url(//cpro2.baidustatic.com/cpro/ui/noexpire/img/2.0.1/new-icon@2x.png) no-repeat;background-position:center;background-size:100%,100%;background-color: rgba(0,0,0,0.6);border-top-right-radius: 4px;}
|
|
.loader{ text-align:center; width:90%; font-size:12px; padding:8px; border:solid 1px #aaaaaa; margin-top:30px; display:none; }.cf:before,.cf:after{content:"\20";display:table;}.cf:after{clear:both;}.cf{*zoom:1;}
|
|
.textOverflow{white-space:nowrap;overflow:hidden;display:inline-block;width:100%;}.textOverflowEllipsis{-o-text-overflow:ellipsis;text-overflow:ellipsis;}.textOverflowClip{-o-text-overflow:clip;text-overflow:clip;}
|
|
.container{display:block !important}
|
|
</style>
|
|
<style>
|
|
.bd-logo2{text-decoration:none;cursor: default;display:block;overflow:hidden;position:absolute;bottom:0;right:0;z-index:2147483647}.bd-logo2{margin:0 0px 2px 0;height:14px;width:13px;background:url(//cpro.baidustatic.com/cpro/ui/noexpire/img/4.0.0/pc_ads_bear.1x.png) no-repeat left top;background-position:0 -20px;_filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,src="//cpro.baidustatic.com/cpro/ui/noexpire/img/4.0.0/pc_ads_bear.1x.png",sizingMethod="crop");_background:0}.bd-logo2:hover{background-position:0 -35px;_filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,src="//cpro.baidustatic.com/cpro/ui/noexpire/img/4.0.0/pc_ads_bear.1x.png",sizingMethod="crop")}
|
|
</style>
|
|
<link rel="stylesheet" href="./ui_e37e61c.css">
|
|
<script type="text/javascript" async="" src="./cpro.js.下载"></script><script type="text/javascript" src="./logo_d508a26.js.下载"></script>
|
|
<script type="text/javascript">
|
|
var Base={config:{},cache:{},getKeysByType:function(b){b=(b||"class").toLowerCase();var a=b+"LoadFinished",c=b+"LoadFnArray",d=b+"LoadMap";this[a]="boolean"===typeof this[a]?this[a]:!0;this[c]=this[c]||[];this[d]=this[d]||{};return{status:a,array:c,map:d,type:b}},updateLoadStatus:function(b,a,c){c=this.getKeysByType(c);if(b&&(this[c.map][b]=a,"loaded"!==a))return this[c.status]=!1;b=!0;for(var d in this[c.map])if(d&&this[c.map].hasOwnProperty(d)&&"loaded"!==this[c.map][d]){b=!1;break}return this[c.status]=
|
|
b},loadImage:function(b){var a=new Image;a.onload=a.onerror=a.onabort=function(){a.onload=a.onerror=a.onabort=null;this.updateLoadStatus(b,"loaded","image");if(this.imageLoadFinished)for(var c,d=0,h=this.imageLoadFnArray.length;d<h;d++)c=this.imageLoadFnArray.shift(),c()}.proxy(this);a.src=b},fastClone:function(b){var a=function(){};a.prototype=b;return new a},declare:function(b){b=b();var a=b.name;if(!a)throw"can't find the obj name";for(var c=b.namespace+"."+a,d=c.split("."),h=d.length,f=window,
|
|
j="",e=0;e<h-1;e++){var g=d[e];f==window?(f[g]=window[g]=window[g]||{},j+=g):(f[g]=f[g]||{},j+="."+g);f=f[g];this.cache[j]=f}f[a]=f[a]||b;this.cache=this.cache||{};this.cache[c]=f[a];return!0},using:function(b,a,c){if(this.cache&&this.cache[b])return this.cache[b];a=a||"class";c=c||this.config.version[a]||"1.0.0";var d;switch(a){case "image":0>b.indexOf("http")&&(b=this.config.baseUrl+"img/"+(c&&"0"!==c?c.toString():"")+"/"+b);this.updateLoadStatus(b,"loading","image");this.loadImage(b);d=b;break;
|
|
case "class":var h=this.getKeysByType(a);a=b.split(".");d=window[a[0]];for(var f=1,j=a.length;f<j;f++)d=d&&d[a[f]]?d[a[f]]:null;if(!d&&!this[h.map][b]){this.updateLoadStatus(b,"loading","class");var e=document.createElement("script");e.type="text/javascript";e.async=!0;a=this.config.baseUrl+"js/";c&&"0"!==c&&(a+=c.toString()+"/");a+=b.replace(/\./gi,"/")+".js";e.src=a.toLowerCase();e.onload=e.onerror=e.onreadystatechange=function(){if(/loaded|complete|undefined/.test(e.readyState)){e.onload=e.onerror=
|
|
e.onreadystatechange=null;if(this.updateLoadStatus(b,"loaded","class"))for(var a,c=0,d=this[h.array].length;c<d;c++)a=this[h.array].shift(),a();e=void 0}}.proxy(this);c=document.getElementsByTagName("script")[0];c.parentNode.insertBefore(e,c)}this.cache=this.cache||{};this.cache[b]=d}return d},config:function(b){b&&(this.config=b)},run:function(b){if(b){var a=this.getKeysByType();this[a.status]?b():this[a.array].push(b)}}};
|
|
Function.prototype.proxy=function(b){var a=this,c=Array.prototype.slice.apply(arguments).shift();return function(b){return a.apply(c,arguments)}};window.declare=Base.declare.proxy(Base);window.using=Base.using.proxy(Base);window.run=Base.run.proxy(Base);window.config=Base.config.proxy(Base);document.execCommand("BackgroundImageCache",!1,!0);
|
|
|
|
</script>
|
|
<script type="text/javascript">
|
|
config({
|
|
baseUrl: "//cpro.baidustatic.com/cpro/ui/noexpire/",
|
|
version: {
|
|
"class": "3.1.6",
|
|
"image": "2.0.1"
|
|
}
|
|
});
|
|
using('Cpro');
|
|
</script>
|
|
|
|
<style type="text/css">.container {padding-left:17px;padding-right:17px;padding-top:9px;padding-bottom:9px;margin-top:0px;border-style:solid;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-color:#ffffff;width:252px;height:18px;background-color:#DCE5EF;position:relative;overflow:hidden;float:none;}
|
|
.item {padding-left:0px;padding-right:0px;padding-top:1px;padding-bottom:1px;width:109px;height:16px;float:left;overflow:hidden;text-align:left;}
|
|
.icon {padding-left:0px;padding-right:0px;padding-top:0px;padding-bottom:0px;width:14px;height:12px;float:left;}
|
|
.icon a {height:12px;}
|
|
.title {padding-left:0px;padding-right:0px;padding-top:0px;padding-bottom:0px;line-height:16px;width:92px;height:16px;overflow:hidden;font-size:12px;font-family:微软雅黑,宋体;text-align:left;color:#000000;text-decoration:underline;font-weight:normal;float:left;}
|
|
.title a {line-height:16px;height:16px;font-size:12px;font-family:微软雅黑,宋体;text-align:left;color:#000000;text-decoration:underline;}
|
|
.title a:hover {color:#EE0000;}
|
|
.itemColumnSpace {width:34px;height:16px;float:left;overflow:hidden;margin-top:0px;margin-bottom:0px;background-color:#-1;}
|
|
</style></head>
|
|
|
|
<body><script type="text/javascript">
|
|
try{window.postMessage && window.parent && window.parent.postMessage(
|
|
{
|
|
"queryid" : "9ab7b88bf50ac13f",
|
|
"tuid" : "u3486002_0",
|
|
"placement" : {
|
|
"basic" : {"sspId":1,"userId":1574361,"flowType":1,"cname":"csdnbaidu_cpr","tuId":9223372032563294514,"sellType":2,"rspFormat":1,"conBackEnv":1,"publisherDomain":{"dup":"rabc1.iteye.com","ubmc":"rabc2.iteye.com/i","pos":"rabc2.iteye.com","wn":"rabc2.iteye.com/qqe"}},
|
|
"container" : {"height":36,"width":286,"sizeType":1,"anchoredType":1,"floated":{}},
|
|
"fillstyle" : {"elements":[5],"layout":[2],"backgroundColor":"#DCE5EF","opacity":0,"flush":0,"txt":{"number":2,"ctitle":"#000000","cborder":"#ffffff","cbackground":"#DCE5EF","fontName":"微软雅黑","fontSize":12,"align":1,"cflush":"#e10900","bborder":0},"lu":{"number":0,"borderWidth":0},"video":{},"search":{},"cloudTheme":{"stid":5},"styleType":2},
|
|
"userdefine" : "%7Ccpro%5Fcpro%5Flu%3D1%2C%23DCE5EF%2C%23000000%2C%E5%BE%AE%E8%BD%AF%E9%9B%85%E9%BB%91%2C%23ffffff%7Ccpro%5Flayout%5Ffilter%3Dimage%7Ccpro%5Ftemplate%3DbaiduCustSTagLinkUnit%7Ccpro%5Fversion%3D2%2E0",
|
|
"encode_userdefine" : "encoded",
|
|
"complement_type" : 2,
|
|
"update" : "1534332114_1532564947"
|
|
},
|
|
"extends" : {"ssph":36,"sspw":286}
|
|
,
|
|
"bidder" : "2",
|
|
"noadx" : "0",
|
|
"pdb_deliv" : {
|
|
"deliv_id" : "0",
|
|
"deliv_des" : {},
|
|
"brandad" : 0
|
|
},
|
|
"order_deliv" : {
|
|
"deliv_id" : "0",
|
|
"demand_id" : "0"
|
|
},
|
|
"rtb_deliv" : {
|
|
"deliv_id" : "0",
|
|
"demand_id" : "3486002"
|
|
}
|
|
}
|
|
, '*')}
|
|
catch(e) {window.console && window.console.log(e);};
|
|
</script>
|
|
<!--sid=f50ac13f9ab7b88b--><div style="display:none;"><img src="./adx(2).php" height="1px" width="1px" alt=""></div>
|
|
<script type="text/javascript">
|
|
var ads = [{"bid":"","curl":"https://cpro.baidu.com/cpro/ui/uijs.php?en=mywWUA71T1YsFh7sT7qGujYsFhPC5H0huAbqrauGTdq9TZ0qnauJp1Y4mycLmW63mhmdnA7WnHPhFh_qFRcLFRPAFRnvFRcLFRFaFRf3FRPKFRfdFRcdFRRLFRFaFRcsFh_s5iNaPzNjwBNjPBNaPzNafBNDraNjfiNDPiNaPiN7PzNafBNanauonHY-wj0-fHD-fYf-wHc-fW0-wbn-fWb-fRc-fYc-fbRhUZNopHYkFhdWTAYqPHD1nW6hTHdWTvw8mh7GuZNxmLKzFMFB5H0hTMnqniu1uyk_ugFxpyfqniu1pyfqnvuWnHK9uWR3mhc3mWT4miu1IA-b5H6hIjdYTAP_pyPouyf1gv9WFMwb5HnYrjmsnjchIAd15HDdPHD3PWD4njnhIZRqIHnYrjmsnjchIHdCIZwsTzR1fiRzwBRzwhF_UvT-nbNWTvw8FHF7UhNYFMmqniuG5H0YmHP9n1Ds&c=news&cf=1&expid=9047_9089_9139_9238_9285_9503_9506_9511_9512_9522_9527_9551_9559_9579_9580_9588_9594&fv=0&itm=0&kdi0=8&kdi1=8&lu_idc=gz&lukid=1&lus=3fc10af58bb8b79a&lust=5c7f888f&mscf=0&n=10&nttp=1&p=baidu&ssp2=1&tsf=dtp:1&u=%2Fyzhang6%5F10%2Farticle%2Fdetails%2F77104211&urlid=0","desc":"废品回收电话","dspw":"","height":36,"icon":656,"iconurl":"","isHb":false,"lpId":3,"surl":"","title":"废品回收电话","type":"text","width":286,"word_src":"#"},{"bid":"","curl":"https://cpro.baidu.com/cpro/ui/uijs.php?en=mywWUA71T1YsFh7sT7qGujYsFhPC5H0huAbqrauGTdq9TZ0qnauJp1Y4mycLmW63mhmdnA7WnHPhFh_qFRfsFRDkFRPDFRRzFRcsFRujFRc4FR7aFRPaFRF7Fh_s5iNDnaNKniNjwaN7nBNanaNAfzNariNKfBNjfBNawiuonHY-fWT-fYm-f1m-fWT-fbc-wj6-fYD-wjR-fWR-wHT-fbc-fW0hUZNopHYzFhdWTAYqP161njchTHdWTvw8mh7GuZNxmLKzFMFB5H0hTMnqniu1uyk_ugFxpyfqniu1pyfqnvuWnHK9uWR3mhc3mWT4miu1IA-b5H6hIjdYTAP_pyPouyf1gv9WFMwb5HnYrjmsnjchIAd15HDdPHD3PWD4njnhIZRqIHnYrjmsnjchIHdCIZwsTzR1fiRzwBRzwhF_UvT-nbNWTvw8FHF7UhNYFMmqniuG5Hb3P1FBuj9-&c=news&cf=1&expid=9047_9089_9139_9238_9285_9503_9506_9511_9512_9522_9527_9551_9559_9579_9580_9588_9594&fv=0&itm=0&kdi0=8&kdi1=8&lu_idc=gz&lukid=2&lus=3fc10af58bb8b79a&lust=5c7f888f&mscf=0&n=10&nttp=1&p=baidu&ssp2=1&tsf=dtp:1&u=%2Fyzhang6%5F10%2Farticle%2Fdetails%2F77104211&urlid=0","desc":"小外包公司","dspw":"","height":36,"icon":420,"iconurl":"","isHb":false,"lpId":3,"surl":"","title":"小外包公司","type":"text","width":286,"word_src":"2"}];
|
|
var config = {"conBW":0,"conOP":0,"consl":1,"cpro_lu":"1,#DCE5EF,#000000,微软雅黑,#ffffff","hn":1,"n":"csdnbaidu_cpr","rsi0":286,"rsi1":36,"rsi5":4,"rss0":"#ffffff","rss1":"#DCE5EF","rss2":"#000000","rss6":"#e10900","staticDomain":"rabc1.iteye.com","temp_exp_flag":0,"titFF":"微软雅黑","titFS":12,"titTA":"left","wn":2};
|
|
var ra = antiCheatArray = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];
|
|
|
|
config.displayType = "inlay";
|
|
config.stuffType = "iconlinkunit";
|
|
|
|
config.iconLinkUnitConfig = {
|
|
enableClick : 0
|
|
};
|
|
|
|
//目前只支持14px和12px 其他用px先适配
|
|
if( config.titFS >= 14){
|
|
config.titFS = 14;
|
|
} else {
|
|
config.titFS = 12;
|
|
}
|
|
|
|
/**if(config.iconLinkUnitConfig){
|
|
if(config.titFS != null && config.titFS == 14){
|
|
using("cpro.baidustatic.com/cpro/exp/lupage/img/icon_14px.png","image","0");
|
|
}else{
|
|
using("cpro.baidustatic.com/cpro/exp/lupage/img/icon_12px.png","image", "0");
|
|
}
|
|
}**/
|
|
config.isGongyi = (ads && ads[0] && ads[0].isHB) ? true : false;
|
|
var rankwidth = config.titFS == 12 ? 3 : 4;
|
|
if(typeof(config.conBW)==="undefined"){
|
|
if(typeof(config.conbw)!="undefined"){
|
|
config.conBW = config.conbw;
|
|
}else{
|
|
config.conBW = 0;
|
|
}
|
|
}
|
|
|
|
//0:none; 1:top; 2:left
|
|
function getBrandType(){
|
|
|
|
return 0;
|
|
|
|
var brandType = 0;
|
|
if((config.rsi1 >= 45) && (config.rsi1 <= 100)&&(config.rsi0 >=135)){
|
|
brandType = 2
|
|
} else if(config.rsi1 > 100){
|
|
brandType = 1;
|
|
}
|
|
return brandType;
|
|
}
|
|
//0:none; 1:top; 2:left
|
|
var brandType = getBrandType();
|
|
var brandWidth = 20;
|
|
var brandHeight = 23;
|
|
var brandBorderWidth =1;
|
|
|
|
var needwidth = config.wn*(config.titFS*7 + 8 + 14 + rankwidth) + config.conBW * 2;
|
|
var conpadTop = 0;
|
|
var conpadLeft = 0;
|
|
var conpadRight = 0;
|
|
|
|
|
|
var needheight = config.hn*(config.titFS + 4 + 1 + 1) + config.conBW * 2;
|
|
if(needwidth > config.rsi0){
|
|
if(config.wn > 1){
|
|
config.wn=config.wn-1;
|
|
needwidth = config.wn*(config.titFS*7 + 8 + 14 + rankwidth) + config.conBW * 2;
|
|
}
|
|
}
|
|
|
|
//left
|
|
if (brandType == 2){
|
|
if ((config.rsi0 - needwidth) > (brandWidth +2 * brandBorderWidth)){
|
|
config.rsi0 = config.rsi0 - brandWidth -2 * brandBorderWidth;
|
|
config.rsi1 = config.rsi1 - 2 * brandBorderWidth;
|
|
}else {
|
|
brandType = 0;
|
|
}
|
|
}
|
|
|
|
//top
|
|
if(brandType == 1){
|
|
if ((config.rsi1 - needheight) <= (brandHeight + 2 * brandBorderWidth)){
|
|
config.hn -=1;
|
|
needheight = config.hn*(config.titFS + 4 + 1 + 1) + config.conBW * 2;
|
|
}
|
|
|
|
if ((config.rsi1 - needheight) <= (brandHeight -2 * brandBorderWidth)){
|
|
config.hn -=1;
|
|
}
|
|
config.rsi1 = config.rsi1 - brandHeight -2 * brandBorderWidth;
|
|
needheight = config.hn*(config.titFS + 4 + 1 + 1) + config.conBW * 2;
|
|
|
|
config.rsi0 = config.rsi0 -2 * brandBorderWidth;
|
|
}
|
|
|
|
conpadLeft = Math.max((config.rsi0 - needwidth)/config.wn, 0);
|
|
conpadLeft = Math.floor(conpadLeft/2);
|
|
|
|
//ie8 conpadLeft>0 has bug in ie8
|
|
var explorer = window.navigator.userAgent ;
|
|
if (explorer.indexOf("MSIE") >= 0) {
|
|
conpadLeft = 0;
|
|
}
|
|
conpadRight = conpadLeft;
|
|
|
|
if(needheight < config.rsi1) {
|
|
conpadTop = Math.max((config.rsi1 - needheight)/config.hn, 0);
|
|
conpadTop = Math.floor(conpadTop/2);
|
|
}
|
|
|
|
</script>
|
|
<style type="text/css">
|
|
.title{text-decoration:none}
|
|
.title a{text-decoration:none}
|
|
.wrapper_top_12,.wrapper_top_14{
|
|
font-family:arial,simsun,sans-serif;
|
|
font-weight:700;
|
|
float:left;width:14px;border:0px;color:#D14836;text-align:center;}
|
|
.wrapper_normal_12,.wrapper_normal_14{
|
|
font-family:arial,simsun,sans-serif;
|
|
font-weight:700;
|
|
float:left;width:14px;border:0px;color:#616060;text-align:center;}
|
|
#container .title a{position:relative;display:block;}
|
|
#container .wrapper_top_12, #container .wrapper_normal_12 {height:16px;font-size:12px;line-height:16px;}
|
|
#container .wrapper_top_14, #container .wrapper_normal_14{height:16px;font-size:12px;line-height:18px;}
|
|
#container .item{cursor:pointer;}
|
|
#container .title{position:relative;}
|
|
#container .hilite a{color:#fff;}
|
|
#container .title a{display:inline;padding-left:4px;padding-right:4px;padding-top:1px;padding-bottom:1px;}
|
|
</style>
|
|
<script type="text/javascript">
|
|
|
|
if (config.rss2 && (config.rss2.toLowerCase() == "#0000ff" || config.rss2.toLowerCase() == "#00f")) {
|
|
config.rss2 = "#000000";
|
|
}
|
|
if(!config.iconbh){
|
|
config.iconbh = "#F2405B";
|
|
}
|
|
if(!config.iconbl){
|
|
config.iconbl = "#858585";
|
|
}
|
|
</script>
|
|
<!-- main -->
|
|
<div class="container" id="container"><div class="item title_top tp_nr_12"><div class="wrapper_top_12">1</div><div class="title" style="height: 16px;"><a id="title0" target="_blank" href="https://cpro.baidu.com/cpro/ui/uijs.php?en=mywWUA71T1YsFh7sT7qGujYsFhPC5H0huAbqrauGTdq9TZ0qnauJp1Y4mycLmW63mhmdnA7WnHPhFh_qFRcLFRPAFRnvFRcLFRFaFRf3FRPKFRfdFRcdFRRLFRFaFRcsFh_s5iNaPzNjwBNjPBNaPzNafBNDraNjfiNDPiNaPiN7PzNafBNanauonHY-wj0-fHD-fYf-wHc-fW0-wbn-fWb-fRc-fYc-fbRhUZNopHYkFhdWTAYqPHD1nW6hTHdWTvw8mh7GuZNxmLKzFMFB5H0hTMnqniu1uyk_ugFxpyfqniu1pyfqnvuWnHK9uWR3mhc3mWT4miu1IA-b5H6hIjdYTAP_pyPouyf1gv9WFMwb5HnYrjmsnjchIAd15HDdPHD3PWD4njnhIZRqIHnYrjmsnjchIHdCIZwsTzR1fiRzwBRzwhF_UvT-nbNWTvw8FHF7UhNYFMmqniuG5H0YmHP9n1Ds&c=news&cf=1&expid=9047_9089_9139_9238_9285_9503_9506_9511_9512_9522_9527_9551_9559_9579_9580_9588_9594&fv=0&itm=0&kdi0=8&kdi1=8&lu_idc=gz&lukid=1&lus=3fc10af58bb8b79a&lust=5c7f888f&mscf=0&n=10&nttp=1&p=baidu&ssp2=1&tsf=dtp:1&u=%2Fyzhang6%5F10%2Farticle%2Fdetails%2F77104211&urlid=0" title="废品回收电话" style="white-space: normal; word-break: break-all; overflow-wrap: break-word;">废品回收电话</a></div></div><div class="itemColumnSpace"></div><div class="item title_top tp_nr_12"><div class="wrapper_top_12">2</div><div class="title" style="height: 16px;"><a id="title1" target="_blank" href="https://cpro.baidu.com/cpro/ui/uijs.php?en=mywWUA71T1YsFh7sT7qGujYsFhPC5H0huAbqrauGTdq9TZ0qnauJp1Y4mycLmW63mhmdnA7WnHPhFh_qFRfsFRDkFRPDFRRzFRcsFRujFRc4FR7aFRPaFRF7Fh_s5iNDnaNKniNjwaN7nBNanaNAfzNariNKfBNjfBNawiuonHY-fWT-fYm-f1m-fWT-fbc-wj6-fYD-wjR-fWR-wHT-fbc-fW0hUZNopHYzFhdWTAYqP161njchTHdWTvw8mh7GuZNxmLKzFMFB5H0hTMnqniu1uyk_ugFxpyfqniu1pyfqnvuWnHK9uWR3mhc3mWT4miu1IA-b5H6hIjdYTAP_pyPouyf1gv9WFMwb5HnYrjmsnjchIAd15HDdPHD3PWD4njnhIZRqIHnYrjmsnjchIHdCIZwsTzR1fiRzwBRzwhF_UvT-nbNWTvw8FHF7UhNYFMmqniuG5Hb3P1FBuj9-&c=news&cf=1&expid=9047_9089_9139_9238_9285_9503_9506_9511_9512_9522_9527_9551_9559_9579_9580_9588_9594&fv=0&itm=0&kdi0=8&kdi1=8&lu_idc=gz&lukid=2&lus=3fc10af58bb8b79a&lust=5c7f888f&mscf=0&n=10&nttp=1&p=baidu&ssp2=1&tsf=dtp:1&u=%2Fyzhang6%5F10%2Farticle%2Fdetails%2F77104211&urlid=0" title="小外包公司" style="white-space: normal; word-break: break-all; overflow-wrap: break-word;">小外包公司</a></div></div><a class="bd-logo2" target="_blank" href="http://wangmeng.baidu.com/" title="百度网盟推广" style="display: none; zoom: 1;"> </a><a class="bd-logo2" style="display: none;"></a><div class="logo-container"><a class="logo-link" href="http://yingxiao.baidu.com/" target="_blank"></a><div class="gap"></div><a href="javascript:;" id="logo-close-btn"></a></div><div id="feedback-container" class="feedback-container"><div id="reason-content" class="reason-content" data-reason-num="4" style="width:160px;padding-top:0px;"><div class="intro">反馈意见:</div><a href="javascript:;" data-value="1" class="reason-item">视觉干扰</a><a href="javascript:;" data-value="2" class="reason-item">内容不宜</a><a href="javascript:;" data-value="3" class="reason-item">不感兴趣</a><a href="javascript:;" data-value="0" class="reason-item">其他原因</a><a class="fb-btn-cancel" href="javascript:;">返回</a></div><div id="thx-content" class="thx-content"><h5>感谢您的反馈!</h5><p>您的反馈已记录,我们将努力改善您的浏览体验。</p></div></div></div><div id="loader" class="loader"></div>
|
|
<div id="lu_loader" class="loader"></div>
|
|
<!-- //main -->
|
|
<script type="text/javascript">
|
|
var ThisPage = {
|
|
layout: function(h) {
|
|
var k = h.userConfig;
|
|
var c = h.fullConfig;
|
|
var i = true;
|
|
var o = {};
|
|
var q = using("Cpro.Template.LayoutEngine.Base");
|
|
c.containerPaddingLeft = conpadLeft;
|
|
c.containerPaddingRight = conpadRight;
|
|
c.containerPaddingTop = conpadTop;
|
|
c.containerPaddingBottom = conpadTop;
|
|
var f = c.templateWidth;
|
|
var j = c.templateHeight;
|
|
var g = q.layoutContainer(f, j, c);
|
|
c.titlePaddingLeft = 0;
|
|
c.titlePaddingRight = 0;
|
|
c.titlePaddingTop = 0;
|
|
c.titlePaddingBottom = 0;
|
|
c.titleFrontIconPaddingRight = 0;
|
|
var l = 7 * c.titleFontSize + 8;// + 14 + rankwidth;
|
|
var d = c.titleFontSize + 4;
|
|
c.titleLineHeight = c.titleFontSize + 4;
|
|
c.titleFontFamily = decodeURIComponent(c.titleFontFamily);
|
|
if (c.titleFontFamily !== decodeURIComponent("%E5%AE%8B%E4%BD%93")) {
|
|
c.titleFontFamily += "," + decodeURIComponent("%E5%AE%8B%E4%BD%93")
|
|
}
|
|
var r = q.layoutTitle(l, d, c, "left");
|
|
o[r.dataKey] = r;
|
|
c.itemPaddingLeft = 0;
|
|
c.itemPaddingRight = 0;
|
|
c.itemPaddingTop = 1;
|
|
c.itemPaddingBottom = 1;
|
|
var b = 7 * c.titleFontSize + 8 + c.itemPaddingLeft + c.itemPaddingRight;
|
|
var m = c.titleFontSize + 4 + c.itemPaddingTop + c.itemPaddingBottom;
|
|
if (c.iconLinkUnitConfig) {
|
|
//var a = c.titleFontSize == 12 ? 15 : 16;
|
|
//var e = c.titleFontSize == 12 ? 12 : 15;
|
|
var a = 14;
|
|
var e = 12;
|
|
var n = q.layoutIcon(a, e, c);
|
|
o[n.dataKey] = n;
|
|
//b = b + a + c.titleFrontIconPaddingRight;
|
|
//number margin-right
|
|
var rankspace = c.titleFontSize == 12 ? 3 : 4;
|
|
b = b + a + rankspace;
|
|
}
|
|
var p = q.layoutItem(b, m, c);
|
|
if (c.iconLinkUnitConfig) {
|
|
p.content.push(n)
|
|
}
|
|
p.content.push(r);
|
|
if (c.adColumnCount > 1) {
|
|
c.itemColumnSpace = Math.floor((c.templateWidth - 2 * c.containerBorderWidth - b * c.adColumnCount- conpadLeft - conpadRight) / (c.adColumnCount - 1))
|
|
} else {
|
|
c.itemColumnSpace = c.templateWidth - 2 * c.containerBorderWidth - b * c.adColumnCount
|
|
}
|
|
if (c.adRowCount > 1) {
|
|
c.itemRowSpace = Math.floor((c.templateHeight - 2 * c.containerBorderWidth - m * c.adRowCount - conpadTop*2) / (c.adRowCount - 1))
|
|
} else {
|
|
c.itemRowSpace = c.templateHeight - 2 * c.containerBorderWidth - m * c.adRowCount
|
|
}
|
|
g = q.layoutSpace(g, p, c);
|
|
g.layoutIndex = o;
|
|
return g
|
|
},
|
|
initialize : function () {
|
|
this.template = using("Cpro.Template");
|
|
this.varManager = using("Cpro.Template.TemplateVariableManager");
|
|
this.userConfig = this.varManager.getFullNameConfig(window.config);
|
|
this.styleCss = using("Cpro.Utility.CssBuilder");
|
|
this.fullConfig = this.varManager.getVariables(this.userConfig);
|
|
this.AddStyleCss();
|
|
resort_ads = this.resortAdbyColumn(ads, this.userConfig);
|
|
this.layoutObj = this.layout({
|
|
userConfig : this.userConfig,
|
|
fullConfig : this.fullConfig
|
|
});
|
|
|
|
this.template.PaintEngine.paint({
|
|
userConfig : this.userConfig,
|
|
fullConfig : this.fullConfig,
|
|
layoutObj : this.layoutObj,
|
|
data : resort_ads
|
|
});
|
|
|
|
this.template.DataEngine.paint({
|
|
userConfig : this.userConfig,
|
|
fullConfig : this.fullConfig,
|
|
layoutObj : this.layoutObj,
|
|
data : resort_ads
|
|
});
|
|
|
|
this.initIcon(resort_ads,this.userConfig);
|
|
//Added
|
|
this.initEvents();
|
|
if(this.autoflag){
|
|
this.setHover(this.iconArray[0]);
|
|
this.autoPlay();
|
|
}
|
|
//-Added
|
|
|
|
//this.AddBaiduBrand(brandType, config.rsi0, config.rsi1, brandWidth, brandHeight, brandBorderWidth);
|
|
|
|
//this.AddBaiduBrand3(brandType, config.rsi0, config.rsi1, brandWidth, brandHeight, brandBorderWidth);
|
|
|
|
//this.AddBaiduBrand2();
|
|
},
|
|
//Added
|
|
currentHLElement: null,
|
|
fadeInTimer: 0,
|
|
fadeOutTimer: 0,
|
|
fadeInTimeout: 20,
|
|
fadeOutTimeout: 20,
|
|
fadeInTime: 300,
|
|
fadeOutTime: 300,
|
|
autoflag:false,
|
|
lunboTimer:0,
|
|
lunboTime:2000,
|
|
lunboIndex:0,
|
|
rotateY:360,
|
|
iconArray:null,
|
|
clickBrandFun: function(){
|
|
var rand = Math.random();
|
|
if (rand <= 0.01) {
|
|
var img = document.createElement('img');
|
|
img.src = '//nativead.baidu.com:8080/native_ad/rank_text/online/click_search_box.log';
|
|
img.style.cssText = 'width:1px; height:1px; display:none;';
|
|
document.body.appendChild(img);
|
|
}
|
|
var value = document.getElementById("bd_search_box").value;
|
|
var curl ='www.baidu.com';
|
|
if (ads.length > 0) {
|
|
curl = ads[0].curl;
|
|
}
|
|
curl = curl.replace(/([?&])k=([^&]*)/g, "$1k=" + value);
|
|
window.open(curl);
|
|
},
|
|
|
|
AddBaiduBrand: function(brandType, width, height, brandWidth, brandHeight, brandBorderWidth){
|
|
var container = document.getElementById("container");
|
|
|
|
var outer = document.createElement('div');
|
|
var con = document.createElement('div');
|
|
|
|
var firstWord ='';
|
|
var curl ='www.baidu.com';
|
|
if (ads.length > 0) {
|
|
firstWord = ads[0].title;
|
|
curl = ads[0].curl;
|
|
}
|
|
//1:top
|
|
if(brandType==1) {
|
|
outer.style.cssText = 'border: ' + brandBorderWidth +'px solid #3388FF; overflow:hidden;width:' + (width) +'px; height:' + (height + brandHeight -1) +'px;';
|
|
con.style.cssText = 'cursor:pointer; background-color:#3388FF; width:' + (width + brandBorderWidth * 2) +'px; height:' + brandHeight +'px;';
|
|
var div_bear = '<div id = "bd_bear" style = "float:left; width:18px; height:18px; background:url(//cpro.baidustatic.com/cpro/exp/lu/icon_bear.png) no-repeat; background-size: 100% 100%; background-position:0 2px; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'//cpro.baidustatic.com/cpro/exp/lu/icon_bear.png\',sizingMethod=\'scale\')" ></div>';
|
|
var div_bd = '<div id ="bd_bd" style = "float:left; text-align:center; width :70px; height:18px; font-size: 14px; color:#fff; padding-top: 2px;"> 百度一下</div>'
|
|
var div_marg = '<div id ="bd_marg" style = "float:left; width:18px; height:18px; background:url(//cpro.baidustatic.com/cpro/exp/lu/icon_margin_white.png) no-repeat; background-size: 100% 100%; background-position:0 2px; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'//cpro.baidustatic.com/cpro/exp/lu/icon_margin_white.png\',sizingMethod=\'scale\')" ></div>';
|
|
if (width >= 180){
|
|
var div_input = '<div style = "float:left; width:' + (width - 18 - 70) +'px; height:18px;font-family: 宋体;"><input id ="bd_search_box" type = "text" style = "color: #999999; width:100%; height:100%; font-size: 14px;" value = "' + firstWord + '"/></div>';
|
|
con.innerHTML = div_bear + div_input + div_bd;
|
|
} else if(width >= 120){
|
|
var div_input = '<div style = "float:left; width:' + (width - 18 - 18) +'px; height:18px; font-family: 宋体;"><input id ="bd_search_box" type = "text" style = "color: #999999; width:100%; height:100%; font-size: 14px;" value = "' + firstWord + '"/></div>';
|
|
con.innerHTML = div_bear + div_input + div_marg ;
|
|
} else {
|
|
var div_input = '<div style = "float:left; width:' + (width - 18) +'px; height:18px;font-family: 宋体;"><input id ="bd_search_box" type = "text" style = "color: #999999; width:100%; height:100%; font-size: 14px;" value = "' + firstWord + '"/></div>';
|
|
con.innerHTML = div_input + div_marg;
|
|
}
|
|
|
|
} else if(brandType == 2) {//left
|
|
container.style.float='left';
|
|
outer.style.cssText = 'border: ' + brandBorderWidth +'px solid #3388FF; overflow:hidden;width:' + (width + brandWidth) +'px; height:' + (height) + 'px;';
|
|
con.style.cssText = 'float:left; cursor:pointer; line-height: 21px; background-color:#3388FF; width:' + brandWidth +'px; height:' + height +'px;';
|
|
var bd = "百度一下"
|
|
if (height < 85){
|
|
bd = "百度"
|
|
}
|
|
con.innerHTML = '<p style = "text-align:center;letter-spacing: 14px; font-size: 14px; color:#fff">'+ bd+'</p>';
|
|
|
|
con.onclick=function(){
|
|
var rand = Math.random();
|
|
if (rand <= 0.01) {
|
|
var img = document.createElement('img');
|
|
img.src = '//nativead.baidu.com:8080/native_ad/rank_text/online/click_brand.log';
|
|
img.style.cssText = 'width:1px; height:1px; display:none;';
|
|
document.body.appendChild(img);
|
|
}
|
|
|
|
window.open('https://www.baidu.com/');
|
|
};
|
|
} else {
|
|
return;
|
|
}
|
|
outer.appendChild(con);
|
|
outer.appendChild(container);
|
|
|
|
document.body.appendChild(outer);
|
|
|
|
if (document.getElementById("bd_bear")){
|
|
document.getElementById("bd_bear").onclick = ThisPage.clickBrandFun;
|
|
}
|
|
if (document.getElementById("bd_marg")){
|
|
document.getElementById("bd_marg").onclick = ThisPage.clickBrandFun;
|
|
}
|
|
if (document.getElementById("bd_bd")){
|
|
document.getElementById("bd_bd").onclick = ThisPage.clickBrandFun;
|
|
}
|
|
},
|
|
|
|
AddBaiduBrand2 :function(){
|
|
var con = document.createElement('div');
|
|
con.id ='bd-brand-logo';
|
|
con.className = 'bd-brand-logo';
|
|
//con.className = 'bd-brand-logo-eject';
|
|
this.styleCss.addCss('.bd-brand-logo{width:35px; height:18px;}');
|
|
this.styleCss.addCss('.bd-brand-logo-eject{width:145px; height:18px;}');
|
|
con.style.cssText = 'position:absolute; right:0px; top:0px; background-color:#2625E5;color:#ffffff; font-size:12px;text-align:center;';
|
|
con.innerHTML ='百度'
|
|
var container = document.getElementById("container");
|
|
container.appendChild(con);
|
|
},
|
|
|
|
AddBaiduBrand3: function(brandType, width, height, brandWidth, brandHeight, brandBorderWidth){
|
|
var container = document.getElementById("container");
|
|
|
|
var outer = document.createElement('div');
|
|
var con = document.createElement('div');
|
|
|
|
var firstWord ='';
|
|
var curl ='www.baidu.com';
|
|
if (ads.length > 0) {
|
|
firstWord = ads[0].title;
|
|
curl = ads[0].curl;
|
|
}
|
|
//1:top
|
|
if(brandType==1) {
|
|
outer.style.cssText = 'border: ' + brandBorderWidth +'px solid #b8b8b8; overflow:hidden;width:' + (width) +'px; height:' + (height + brandHeight -1) +'px;';
|
|
con.style.cssText = ' width:' + (width + brandBorderWidth * 2) +'px; height:' + brandHeight +'px;overflow:hidden;';
|
|
|
|
var div_bear = '<div id = "bd_bear" style = "float:left; width:9px; height:18px; background-color:#000000; margin-left:5px; margin-top: 3px;"></div>'
|
|
var div_input = '<div style = "float:left; width:' + (width - 9-5 -5) +'px; height:18px;font-family: 宋体;font-weight: bold; font-size: 14px; margin-left:5px; margin-top: 3px;overflow:hidden;">点击去百度搜索</div>';
|
|
con.innerHTML = div_bear +div_input;
|
|
} else if(brandType == 2) {//left
|
|
container.style.float='left';
|
|
outer.style.cssText = 'border: ' + brandBorderWidth +'px solid #b8b8b8; overflow:hidden;width:' + (width + brandWidth) +'px; height:' + (height) + 'px;';
|
|
con.style.cssText = 'float:left; line-height: 21px; background-color:#3388FF; width:' + brandWidth +'px; height:' + height +'px;';
|
|
var bd = "百度搜索"
|
|
if (height < 85){
|
|
bd = "百度"
|
|
}
|
|
con.innerHTML = '<p style = "text-align:center;letter-spacing: 14px; font-size: 14px; color:#fff">'+ bd+'</p>';
|
|
|
|
var sign = document.createElement('div');
|
|
sign.style.cssText = 'position:absolute;left:10px;top:' + (height /2 -15)+'px;width:30px;height:30px;font-size:30px;color:#3388FF;'
|
|
sign.innerHTML = "◆";
|
|
con.appendChild(sign);
|
|
|
|
} else {
|
|
return;
|
|
}
|
|
|
|
outer.appendChild(con);
|
|
outer.appendChild(container);
|
|
document.body.appendChild(outer);
|
|
},
|
|
|
|
AddStyleCss :function(){
|
|
|
|
//var CommonCss = '#container .wrapper_top_12, #container .wrapper_top_14{background-color:'+config.iconbh+';}#container .wrapper_normal_12, #container .wrapper_normal_14{background-color:'+config.iconbl+'}#container .hilite .title{background-color:'+config.iconbh+';}';
|
|
//this.styleCss.addCss(CommonCss);
|
|
},
|
|
setOpacity: function(el,value){
|
|
el.style.filter = 'alpha(opacity='+Math.round(value*100)+')';
|
|
el.style.mozOpacity = value;
|
|
el.style.opacity = value;
|
|
},
|
|
fadeIn: function(el){
|
|
var that = this;
|
|
this.setOpacity(el,0);
|
|
var opacity = 0;
|
|
var interval = 10;
|
|
var counter = 0;
|
|
var times = Math.ceil(that.fadeInTime/interval);
|
|
clearInterval(el.fadeInTimer);
|
|
var timer = el.fadeInTimer = setInterval(function(){
|
|
counter++;
|
|
opacity = counter/times;
|
|
that.setOpacity(el,opacity);
|
|
if(counter >= times){
|
|
that.setOpacity(el,1);
|
|
clearInterval(timer);
|
|
}
|
|
},interval);
|
|
},
|
|
fadeOut: function(el){
|
|
var that = this;
|
|
this.setOpacity(el,1);
|
|
var opacity = 0;
|
|
var interval = 10;
|
|
var counter = 0;
|
|
var times = Math.ceil(that.fadeInTime/interval);
|
|
clearInterval(el.fadeOutTimer);
|
|
var timer = el.fadeOutTimer = setInterval(function(){
|
|
counter++;
|
|
opacity = 1 - counter/times;
|
|
that.setOpacity(el,opacity);
|
|
if(counter >= times){
|
|
that.setOpacity(el,0);
|
|
clearInterval(timer);
|
|
}
|
|
},interval);
|
|
},
|
|
nextLuwords:function(){
|
|
var item = this.iconArray[this.lunboIndex];
|
|
this.setNormal(item);
|
|
if (this.lunboIndex >= 2) {
|
|
this.lunboIndex = 0;
|
|
}else{
|
|
this.lunboIndex = this.lunboIndex + 1;
|
|
}
|
|
item = this.iconArray[this.lunboIndex];
|
|
this.setHover(item);
|
|
},
|
|
autoPlay:function(){
|
|
if(!this.autoflag){
|
|
return;
|
|
}
|
|
if (this.iconArray.length == 0){
|
|
return;
|
|
}
|
|
this.lunboTimer = setInterval(function () {
|
|
ThisPage.nextLuwords();
|
|
},this.lunboTime);
|
|
},
|
|
setHover:function(node){
|
|
var title = node.parentNode.lastChild.childNodes[0];
|
|
// style.backgroundColor;
|
|
if(node.className.indexOf('normal') === -1){
|
|
node.parentNode.style.backgroundColor = "#D14836";
|
|
}else{
|
|
node.parentNode.style.backgroundColor = "#616060";
|
|
}
|
|
title.style.color = "#ffffff";
|
|
node.style.color = "#ffffff";
|
|
this.currentHLElement = node.parentNode;
|
|
},
|
|
setNormal:function(node){
|
|
var title = node.parentNode.lastChild.childNodes[0];
|
|
// style.backgroundColor;
|
|
node.parentNode.style.backgroundColor = "";
|
|
title.style.color = "#"+this.fullConfig.titleFontColor;
|
|
if(node.className.indexOf('normal') === -1){
|
|
node.style.color = "#D14836";
|
|
} else {
|
|
node.style.color = "#616060";
|
|
}
|
|
},
|
|
initEvents: function(){
|
|
//use event delegation
|
|
var container = document.getElementById("container");
|
|
var that = this;
|
|
container.onmouseover = function(e){
|
|
if(ThisPage.autoflag) {
|
|
clearInterval(ThisPage.lunboTimer);
|
|
}
|
|
e = e || window.event;
|
|
var target = e.target || e.srcElement;
|
|
var node;
|
|
node = target;
|
|
var isFromDescendant = false;
|
|
var crt;
|
|
//if(!node.className){return;}
|
|
while(node){
|
|
var className = node.className || '';
|
|
if(className.indexOf('title_') !== -1){
|
|
break;
|
|
}
|
|
node = node.parentNode;
|
|
}
|
|
if(node && node.className.indexOf('title_') !== -1){
|
|
isFromDescendant = true;
|
|
}
|
|
crt = node;
|
|
if(!isFromDescendant){return;}
|
|
//remove
|
|
var currentHLElement = that.currentHLElement;
|
|
if(currentHLElement === crt){
|
|
return;
|
|
}
|
|
if(currentHLElement){
|
|
var currNode;
|
|
if(currentHLElement.lastChild){
|
|
currNode=currentHLElement.lastChild.lastChild;
|
|
}
|
|
if (currNode.id.substr(0,currNode.id.lastIndexOf("title")+5).toLowerCase() == "title"){
|
|
ThisPage.setNormal(currentHLElement.childNodes[0]);
|
|
}
|
|
}
|
|
that.currentHLElement = crt;
|
|
var lastChild = crt.lastChild;
|
|
while(lastChild && !lastChild.tagName){
|
|
lastChild = lastChild.previousSibling;
|
|
}
|
|
g = lastChild.lastChild;
|
|
if(g.id.substr(0,g.id.lastIndexOf("title")+5).toLowerCase() == "title"){
|
|
var node = g.parentNode.parentNode.childNodes[0];
|
|
// style.backgroundColor;
|
|
ThisPage.setHover(node);
|
|
}
|
|
|
|
if (false){
|
|
//brand con
|
|
if (crt.className.indexOf('title_') != -1) {
|
|
var titleSearch = document.getElementById('bd-title-search');
|
|
if(!titleSearch) {
|
|
titleSearch = document.createElement('div');
|
|
titleSearch.id = 'bd-title-search'
|
|
titleSearch.style.cssText = "cursor:pointer; border:2px solid #3388ff; width:116px;height:17px; background-color:#3388ff; position:absolute; ";
|
|
document.body.appendChild(titleSearch);
|
|
}
|
|
|
|
var div_marg = '<div style = "display:inline-block; width:17px; height:17px; background:url(//cpro.baidustatic.com/cpro/exp/lu/icon_margin_white.png) no-repeat; background-size: 100% 100%; background-position:0 -1px;filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'//cpro.baidustatic.com/cpro/exp/lu/icon_margin_white.png\',sizingMethod=\'scale\')" ></div>';
|
|
if (config.rsi0 > 140){
|
|
div_marg = '<div style = "text-align:center; width:34px; height:17px;display:inline-block;overflow:hidden;line-height: 17px;font-size:14px; font-family:宋体;color:#ffffff;" >搜索</div>';
|
|
titleSearch.style.width = '133px'
|
|
}
|
|
titleSearch.innerHTML = '<div style = "text-align:center; width:98px; height:17px; display:inline-block; overflow:hidden; background-color:#ffffff; line-height: 17px; font-size:14px; font-family:宋体;">' + g.innerHTML + '</div>' + div_marg;
|
|
titleSearch.style.display = 'block';
|
|
titleSearch.onclick = function (){
|
|
var url = g.href;
|
|
window.open(url);
|
|
}
|
|
|
|
var t = 0;
|
|
var l = 0;
|
|
function getpos(e){
|
|
t=e.offsetTop;
|
|
l=e.offsetLeft;
|
|
var height=e.offsetHeight;
|
|
while(e=e.offsetParent){
|
|
t+=e.offsetTop;
|
|
l+=e.offsetLeft;
|
|
}
|
|
}
|
|
getpos(crt);
|
|
|
|
titleSearch.style.top = t + 'px';
|
|
titleSearch.style.left = l+ 'px';
|
|
|
|
ThisPage.titleSearchOldTop = titleSearch.style.top;
|
|
ThisPage.titleSearchOldLeft = titleSearch.style.left;
|
|
clearTimeout(ThisPage.titleSearchTimer);
|
|
ThisPage.titleSearchTimer = setTimeout(function(){
|
|
var titleSearch = document.getElementById('bd-title-search');
|
|
if ((ThisPage.titleSearchOldTop === titleSearch.style.top)
|
|
&& (ThisPage.titleSearchOldLeft = titleSearch.style.left)){
|
|
titleSearch.style.display = 'none';
|
|
}
|
|
}, 5000);
|
|
}
|
|
}
|
|
};
|
|
container.onmouseout = function(e){
|
|
e = e || window.event;
|
|
var target = e.target || e.srcElement;
|
|
|
|
if ((target.className.indexOf('title_') === -1)) {
|
|
var titleSearch = document.getElementById('bd-title-search');
|
|
if(titleSearch) {
|
|
//titleSearch.style.display = 'none';
|
|
}
|
|
}
|
|
|
|
var other = e.relatedTarget || e.toElement;
|
|
var node;
|
|
var crt = target;
|
|
while(crt && crt.parentNode){
|
|
var className = crt.className || '';
|
|
if(className.indexOf('title_') !== -1){
|
|
break;
|
|
}
|
|
crt = crt.parentNode;
|
|
}
|
|
if(!crt || !crt.className || crt.className.indexOf('title_') === -1){
|
|
ThisPage.autoPlay();
|
|
return;
|
|
}
|
|
var isToSelf = false;
|
|
node = other;
|
|
while(node && node !== crt){
|
|
node = node.parentNode;
|
|
}
|
|
if(node === crt){
|
|
isToSelf = true;
|
|
}
|
|
if(isToSelf){return;}
|
|
|
|
//remove
|
|
var currentHLElement = crt;
|
|
if(currentHLElement){
|
|
var currNode;
|
|
if(currentHLElement.lastChild){
|
|
currNode=currentHLElement.lastChild.lastChild;
|
|
}
|
|
if (currNode.id.substr(0,currNode.id.lastIndexOf("title")+5).toLowerCase() == "title"){
|
|
var node = currentHLElement.childNodes[0];
|
|
ThisPage.setNormal(node);
|
|
}
|
|
}
|
|
that.currentHLElement = null;
|
|
ThisPage.autoPlay();
|
|
|
|
|
|
};
|
|
container.onclick = function(e){
|
|
e = e || window.event;
|
|
var target = e.target || e.srcElement;
|
|
if(target.tagName && target.tagName.toUpperCase() === 'A'){
|
|
return;
|
|
}
|
|
var node;
|
|
node = target;
|
|
var isFromDescendant = false;
|
|
var crt;
|
|
if(!node.className){return;}
|
|
while(node && node.className && node.className.indexOf('title_') === -1){
|
|
node = node.parentNode;
|
|
}
|
|
if(node && node.className.indexOf('title_') !== -1){
|
|
isFromDescendant = true;
|
|
}
|
|
crt = node;
|
|
if(!isFromDescendant){return;}
|
|
var link = crt.getElementsByTagName('A')[0];
|
|
if(link){
|
|
var url = link.href;
|
|
if(url){
|
|
window.open(url);
|
|
}
|
|
}
|
|
};
|
|
},
|
|
//-Added
|
|
initIcon : function(ads,param){
|
|
var container = document.getElementById("container");
|
|
var bdLogo = document.createElement("a");
|
|
bdLogo.setAttribute("class", "bd-logo2");
|
|
container.appendChild(bdLogo);
|
|
var linkA = document.getElementsByTagName('a');
|
|
for (var i = 0; i < linkA.length; i++) {
|
|
var tempClassName = linkA[i].className;
|
|
if (tempClassName === 'bd-logo' || tempClassName === 'bd-logo2' || tempClassName === 'bd-logo3' || tempClassName === 'bd-logo4' || tempClassName === 'bd-logo5' || tempClassName === 'bd-logo1') {
|
|
if (typeof config.consl == 'undefined') {
|
|
config.consl = 1;
|
|
};
|
|
if(typeof defaultIsShow == 'undefined'){
|
|
defaultIsShow = false;
|
|
}
|
|
if (defaultIsShow && config.consl) {
|
|
linkA[i].style.display = 'block';
|
|
} else {
|
|
linkA[i].style.display = 'none';
|
|
}
|
|
}
|
|
};
|
|
var ad_index = 0;
|
|
var top_times = 0;
|
|
this.iconArray = new Array();
|
|
for(var i=0;i<container.children.length && ad_index < ads.length;i++){
|
|
var item = container.children[i];
|
|
if(item.className == "item"){
|
|
|
|
/*Added*/
|
|
var type1 = "nm", type2 = "nm";
|
|
var anchor = item.getElementsByTagName('A')[0];
|
|
if(anchor){
|
|
var text = 'innerText' in anchor? anchor.innerText:anchor.textContent;
|
|
var byteLength = text.replace(/[^\u0000-\u00ff]/g,'aa').length;
|
|
if(byteLength <= 12){
|
|
type2 = "nr";
|
|
}
|
|
}
|
|
/*-Added*/
|
|
if (param.adRowCount == 1) {
|
|
if (ad_index < 3) {
|
|
/*Added*/
|
|
type1 = "tp";
|
|
/*-Added*/
|
|
item.className = "item title_top"/*Added*/ + " "+type1+"_"+type2+"_" + param.titleFontSize/*-Added*/;
|
|
item.children[0].className = "wrapper_top_" + param.titleFontSize;
|
|
} else {
|
|
item.className = "item title_normal"/*Added*/ + " "+type1+"_"+type2+"_" + param.titleFontSize/*-Added*/;
|
|
item.children[0].className = "wrapper_normal_" + param.titleFontSize;
|
|
}
|
|
} else {
|
|
if (ad_index % param.adColumnCount == 0 && top_times < 3) {
|
|
/*Added*/
|
|
type1 = "tp";
|
|
/*-Added*/
|
|
item.className = "item title_top"/*Added*/ + " "+type1+"_"+type2+"_" + param.titleFontSize/*-Added*/;
|
|
item.children[0].className = "wrapper_top_" + param.titleFontSize;
|
|
top_times++;
|
|
} else {
|
|
item.className = "item title_normal"/*Added*/ + " "+type1+"_"+type2+"_" + param.titleFontSize/*-Added*/;
|
|
item.children[0].className = "wrapper_normal_" + param.titleFontSize;
|
|
}
|
|
}
|
|
|
|
item.children[0].innerHTML = ad_index % param.adColumnCount * param.adRowCount + parseInt(ad_index / param.adColumnCount) + 1;
|
|
ad_index++;
|
|
}
|
|
}
|
|
for(var i=0;i<ads.length;i++){
|
|
var iconindex = (i % param.adRowCount * param.adColumnCount + Math.floor(i / param.adRowCount))*2;
|
|
if (iconindex < container.children.length){
|
|
var iconitem = container.children[iconindex];
|
|
if (iconitem.children[0]){
|
|
this.iconArray.push(iconitem.children[0]);
|
|
}
|
|
}
|
|
}
|
|
},
|
|
resortAdbyColumn : function(ads, param) {
|
|
var resort_ads = new Array(param.adRowCount * param.adColumnCount);
|
|
for (var i = 0; i < resort_ads.length; i++) {
|
|
if (i >= ads.length) {
|
|
resort_ads[i % param.adRowCount * param.adColumnCount + parseInt(i / param.adRowCount)] = ads[i - ads.length];
|
|
} else {
|
|
resort_ads[i % param.adRowCount * param.adColumnCount + parseInt(i / param.adRowCount)] = ads[i];
|
|
}
|
|
}
|
|
return resort_ads;
|
|
}
|
|
};
|
|
run(ThisPage.initialize.proxy(ThisPage));
|
|
|
|
</script>
|
|
<script>
|
|
var defaultIsShow = false;
|
|
var logoCon={logoIsShow:function(){var b,c,a=document.getElementsByTagName("a");for(b=0;b<a.length;b++)c=a[b].className,("bd-logo"==c||"bd-logo2"==c||"bd-logo3"==c||"bd-logo4"==c||"bd-logo5"==c||"bd-logo1"==c)&&("undefined"==typeof config.consl&&(config.consl=1),a[b].style.display=(defaultIsShow && config.consl)?"block":"none")}};logoCon.logoIsShow();
|
|
</script>
|
|
<script>
|
|
setTimeout(function(){
|
|
logo.init({containerId: 'container', closeDirect: true, feedbackParentId: 'container', deviceType: 1});
|
|
},20);
|
|
</script>
|
|
|
|
|
|
</body></html> |