Skip to content

Commit

Permalink
Added a default value
Browse files Browse the repository at this point in the history
  • Loading branch information
dave9123 committed Oct 26, 2024
1 parent 3d96192 commit 1619896
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion static/worksheets/api/unlods.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
unlods = document.getElementById('onbeforeunload');
window.addEventListener('load', () => {
unlods.value = localStorage.getItem('onbeforeunload');
unlods.value = localStorage.getItem('onbeforeunload') || "true";
});
document.getElementById('onbeforeunloadForm').addEventListener('submit', (event) => {
onbeforeunloadSetting = document.getElementById('onbeforeunload').value;
Expand Down

0 comments on commit 1619896

Please # to comment.