Skip to content

Commit

Permalink
Added scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
charandeepsinghb committed Nov 30, 2023
1 parent b3350e8 commit 27029ac
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
4 changes: 4 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,10 @@
<label>Seperate</label>
<input type="checkbox" onclick="changeSeperate(event.target.checked)">
</div>
<div>
<label>Scroll</label>
<input type="checkbox" onclick="changeScroll(event.target.checked)">
</div>
<div>
<label>Word space:</label>
<div>
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,3 +214,15 @@ function changeSeperate(isOn) {
}
baniSection.innerHTML = baniSection.innerHTML.replaceAll('॥<br data-mybreak="true">', '॥');
}

/*********************** Scroll *************************/

function changeScroll(isOn) {
if (isOn) {
baniSection.style.overflowY = 'scroll';
baniSection.style.columnWidth = 'revert';
return;
}
baniSection.style.overflowY = 'hidden';
baniSection.style.columnWidth = '100vw';
}

0 comments on commit 27029ac

Please sign in to comment.