docs: #339 adding a cookie for lineNumbers
This commit is contained in:
parent
3f04a56f51
commit
dd3311b2a4
@ -23,6 +23,9 @@
|
||||
|
||||
cookieValue = getCookie("stickyEnabled");
|
||||
var stickyEnabled = cookieValue != "false";
|
||||
|
||||
cookieValue = getCookie("lineNumbers");
|
||||
var lineNumbers = cookieValue != "false";
|
||||
</script>
|
||||
|
||||
@if (Model.GanjoorPage != null && Model.GanjoorPage.NoIndex)
|
||||
@ -42,7 +45,9 @@
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
checkWebShareSupport();
|
||||
btshmr(@Model.GanjoorPage.Id);
|
||||
if (lineNumbers) {
|
||||
btshmr(@Model.GanjoorPage.Id);
|
||||
}
|
||||
checkIfBookmarked(@Model.GanjoorPage.Id);
|
||||
});
|
||||
</script>
|
||||
@ -244,7 +249,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -92,6 +92,7 @@ function btshmr_internal(poemId) {
|
||||
bnumdiv[i].remove();
|
||||
}
|
||||
document.getElementById("bnum-button").innerHTML = 'شمارهگذاری<i class="info-buttons" id="format_list_numbered_rtl">format_list_numbered_rtl</i>';
|
||||
setCookie("lineNumbers", "false", 365);
|
||||
return true;
|
||||
}
|
||||
document.getElementById("bnum-button").innerHTML = 'حذف شمارهها<i class="info-buttons" id="format_list_numbered_rtl">format_list_numbered_rtl</i>';
|
||||
@ -118,6 +119,7 @@ function btshmr_internal(poemId) {
|
||||
j = 0;
|
||||
}
|
||||
}
|
||||
setCookie("lineNumbers", "true", 365);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user