Skip to content

Commit

Permalink
Merge pull request #5 from nielsdos/fix-reference-error
Browse files Browse the repository at this point in the history
[1.x] Fix: ReferenceError in JavaScript code preventing refresh
  • Loading branch information
DarkGhostHunter authored Nov 17, 2022
2 parents 76755b7 + 9287677 commit db68a64
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions resources/views/script.blade.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
@once
<script>
// start-poke-script
if (typeof poke_reload_window === 'undefined') {
const poke_reload_window = () => {
window.location.reload();
};
}
if (typeof poke_renew === 'undefined') {
let poke_last = new Date();
Expand All @@ -28,7 +22,7 @@
const poke_expire_check = () => {
if (navigator.onLine && new Date() - poke_last >= {{ $interval }} + {{ $lifetime }}) {
poke_reload_window();
window.location.reload();
}
};
Expand Down

0 comments on commit db68a64

Please sign in to comment.