第八十章 玉钩洞群雄夺宝,游仙书择主出世… (第2/2页)
}elseif(readSetBackground=='rbgopenlight'){
$(".lilighttxet").text('关灯');
$("div#readercontainer").css("color","rgb(0,0,0)");
}
}
//判断文本字体大小设置cookie是否保存如果存在恢复设置
varreadsetfontsize=getCookie("readsetfontsize");
if(readsetfontsize){
$("div#readercontainer").css("font-size",readsetfontsize+"px");
}
//判断文本行间距设置cookie是否保存如果存在恢复设置
varreadsetlineheihgt=getCookie("readsetlineheihgt");
if(readsetlineheihgt){
$("div#readercontainer").css("line-height",readsetlineheihgt+"px");
}
//减小字体
$("#ddminus").click(function(){
varfontbody=$("div#readercontainer").css("font-size");
varfontsize=parseInt(fontbody);
if(fontsize>16){
varnefont=eval(fontsize-2);
$("div#readercontainer").css("font-size",nefont+"px");
$("#ddplus").html("A+");
varfontbody=$("div#readercontainer").css("font-size");
varfontsize=parseInt(fontbody);
if(fontsize==16){
$("#ddminus").html("A");
}
//添加cookie记录
setCookie("readsetfontsize",nefont,30);
}
});
//增大字体
$("#ddplus").click(function(){
varfontbody=$("div#readercontainer").css("font-size");
varfontsize=parseInt(fontbody);
if(fontsizeA-");
varfontbody=$("div#readercontainer").css("font-size");
varfontsize=parseInt(fontbody);
if(fontsize==28){
$("#ddplus").html("A");
}
//添加cookie记录
setCookie("readsetfontsize",nefont,30);
}
});
//行间距设置增大
$("#hang-xiao").click(function(){
varlineHeight=$("div#readercontainer").css("line-height");
varlineHeightNum=parseInt(lineHeight);
if(lineHeightNum>25){
varlineHN=eval(lineHeightNum-4);
$("div#readercontainer").css("line-height",lineHN+"px");
$("#hang-da").html("T+");
varlineHeight=$("div#readercontainer").css("line-height");
varlineHeightNum=parseInt(lineHeight);
if(lineHeightNum==22){
$("#hang-xiao").html("T");
}
//添加cookie记录
setCookie("readsetlineheihgt",lineHN,30);
}
});
//行间距设置减小
$("#hang-da").click(function(){
varlineHeight=$("div#readercontainer").css("line-height");
varlineHeightNum=parseInt(lineHeight);
if(lineHeightNumT-");
varlineHeight=$("div#readercontainer").css("line-height");
varlineHeightNum=parseInt(lineHeight);
if(lineHeightNum==46){
$("#hang-da").html("T");
}
//添加cookie记录
setCookie("readsetlineheihgt",lineHN,30);
}
});
//切换阅读背景颜色
$("d_bgdlspan").each(function(index,element){
$(this).click(function(){
varbackColorValue=$(this).attr('class');
$("body").removeClass();
$("body").addClass(backColorValue);
//添加cookie记录
setCookie("readSetBackground",backColorValue,30);
});
});
//切换关灯效果
$("div.book_titlexet").toggle(function(){
$("#qiehuancss").attr('href',"-");
$("div#readercontainer").css("color","#666");
$(".lilighttxet").text('开灯');
//添加cookie记录
setCookie("readSetBackground","rbgcloselight",30);
},function(){
$("#qiehuancss").attr('href',"");
$("div#readercontainer").css("color","rgb(0,0,0)");
$(".lilighttxet").text('关灯');
//添加cookie记录
setCookie("readSetBackground","rbgopenlight",30);
});
$("#add_bookcase").click(function(){
vartextContent=$(this).text();
varjquser=getCookie("jieqiUserInfo");
if(textContent=='加入书架'){
if(!jquser){
.href="";
returnfalse;
}
vararticle_id="134545";
varchapter_id="6102733";
varpage_=pageidth();
varpage_h=pageHeight();
varpage_l=pageLeft();
varpage_t=pageTop();
vardialog_=parseInt(dth);
vardialog_h=parseInt();
vardialog_top=page_t+(page_h/2)-(dialog_h/2);
if(dialog_top(.+?)","igm");
varcc=(/\r\n/g,"");
varstr=xec(cc)[1];
str=("style=\"idth:500px;margin-top:150px;\"","");
$("#dialog").css("display","block");
$("#dialog").css("top",dialog_top);
$("#dialog").css("left",dialog_left);
$("#dialogCN").html(str);
}