mirror of
https://github.com/brunofontes/shareit.git
synced 2025-11-16 00:10:53 -03:00
feat: broadcasting item to refresh pages
This commit is contained in:
@@ -2,15 +2,7 @@
|
||||
|
||||
@section('content')
|
||||
|
||||
<script type="text/javascript">
|
||||
setInterval(
|
||||
function() {
|
||||
if (!document.hasFocus() ) {
|
||||
window.location.reload(true);
|
||||
}
|
||||
},
|
||||
2*60000); //NOTE: period is passed in milliseconds
|
||||
</script>
|
||||
@vite('resources/js/pusher.js')
|
||||
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
@@ -53,4 +45,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@endsection
|
||||
|
||||
Reference in New Issue
Block a user