refactoring

This commit is contained in:
Hamid Reza Mohammadi 2026-07-20 13:42:26 +03:30
parent 3bdec8092e
commit 2f1e711074
3 changed files with 27 additions and 30 deletions

View File

@ -233,34 +233,6 @@ else if (Model.ReadOnlyMode)
@Html.Raw(ViewData["TrackingScript"])
}
@if (Model.LoggedIn)
{
if (Model.IsPoemPage)
{
if (Model.KeepHistory)
{
<script>
AddToMyHistory(@Model.GanjoorPage.Id);
</script>
}
}
@if (Model.GanjoorPage.Id == GanjoorPageModel.GanjoorSlashVaznPageId)
{
<script>
function asyncStartupLoadWordCounts() {
return new Promise((resolve, reject) => {
setTimeout(() => {
loadWordCounts(0, 0, false)
}, 100);
});
}
asyncStartupLoadWordCounts();
</script>
}
}
<script>
document.addEventListener("DOMContentLoaded", function() {
document.querySelectorAll("table.stats").forEach(table => {

View File

@ -115,4 +115,19 @@
</p>
</div>
}
</div>
</div>
@if (Model.GanjoorPage.Id == GanjoorPageModel.GanjoorSlashVaznPageId)
{
<script>
function asyncStartupLoadWordCounts() {
return new Promise((resolve, reject) => {
setTimeout(() => {
loadWordCounts(0, 0, false)
}, 100);
});
}
asyncStartupLoadWordCounts();
</script>
}

View File

@ -1052,4 +1052,14 @@
}
});
</script>
}
}
@if (Model.LoggedIn)
{
if (Model.KeepHistory)
{
<script>
AddToMyHistory(@Model.GanjoorPage.Id);
</script>
}
}