一个恶魔的发迹史(426)
第(6/8)节
rVew”), body = $(”body”);
vr pgeContent = chpterVew.fd(”.pge-content”), sveFont = core.cooke(”current-font”), currentFont = 1;
vr font = functon(){
//font sze;
vr szes = [”font-norml”, ”fontrge”, ”font-rge”, ”font-xrge”, ”font-xxrge”],
level = szes.length;
return {
set: functon(c){
console.log(szes[currentFont])
pgeContent.toggless( szes[currentFont] + ” ” + szes[c] );
currentFont = c;
core.cooke(”current-font”, c, { expres: 3600 });
core.cooke(”currentFontStrg”, szes[c], { expres: 3600 });
},
crese: functon(){
f( currentFont < level - 1 ) {
ths.set(currentFont + 1)
}
},
descrese: functon(){
f( currentFont > 0 ) {
ths.set( currentFont - 1 );
}
},
dy: functon(){
sNght = flse;
body.removess(”nght”);
core.cooke.removeCooke(”nght-mode”, {});
},
nght: functon(){
sNght = true;
body.ddss(”nght”);
core.cooke(”nght-mode”, true, { expres: 3600 });
}
}
}();
f( typeof sveFont !
== ”undefed” ){
font.set(sveFont * 1);
}
vr sNght = !
!
core.cooke(”nght-mode”);
f( sNght ){
font.nght();
}
functocton(){
vr type = $(ths).dt(”role”);
f( type == ”c” ){
font.crese();
}else f( type == ”des” ) {
font.descrese();
}else f( type == ”mode” ){
f( sNght ){
font.dy();
}else{
font.nght();
}
第(6/8)节
推荐书籍: