Fix floating value read
This commit is contained in:
parent
f78a5ec245
commit
108545ee10
@ -84,10 +84,19 @@ $(function () {
|
|||||||
codeBlockView = $('.right-column');
|
codeBlockView = $('.right-column');
|
||||||
if (!codeBlockView.size()) return;
|
if (!codeBlockView.size()) return;
|
||||||
|
|
||||||
|
var floating = $(document.body).hasClass("with-float");
|
||||||
|
|
||||||
codeBlockState = localStorage.getItem("codeBlockState");
|
codeBlockState = localStorage.getItem("codeBlockState");
|
||||||
|
|
||||||
if (!codeBlockState) {
|
if (!codeBlockState) {
|
||||||
codeBlockState = 2;
|
codeBlockState = floating? 2 : 1;
|
||||||
} else codeBlockState = parseInt(codeBlockState);
|
} else {
|
||||||
|
codeBlockState = parseInt(codeBlockState);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!floating && codeBlockState == 2) {
|
||||||
|
codeBlockState = 1;
|
||||||
|
}
|
||||||
|
|
||||||
setCodeBlockStyle(codeBlockState);
|
setCodeBlockStyle(codeBlockState);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user