Skip to content

Commit

Permalink
Update application.js
Browse files Browse the repository at this point in the history
  • Loading branch information
peregrineshahin authored Dec 16, 2023
1 parent 65007cf commit ac17f07
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions server/fishtest/static/js/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,9 @@ function async_sleep(ms) {
});
}

const fishtest_broadcast_key = "fishtest_broadcast";
let broadcast_dispatch = { log_out_: log_out_,};

const broadcast = (cmd, arg) => {
const cmd_function = broadcast_dispatch[cmd];
localStorage.setItem(
Expand Down Expand Up @@ -277,11 +280,6 @@ const log_out = () => {
// Execute a function in all connected tabs.
// See notifications.js for a usage example.

const fishtest_broadcast_key = "fishtest_broadcast";
let broadcast_dispatch = {
log_out_: log_out_,
};

window.addEventListener("storage", (event) => {
if (event.key == fishtest_broadcast_key) {
const cmd = JSON.parse(event.newValue);
Expand Down

0 comments on commit ac17f07

Please sign in to comment.