Skip to content

Commit

Permalink
Fix admin
Browse files Browse the repository at this point in the history
  • Loading branch information
inventionpro committed Aug 26, 2024
1 parent 5e5d47f commit 9d652b5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions user/servers.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<button onclick="localStorage.removeItem('key');location.pathname='/'">Log out</button>
<div id="admin-other" style="display:none;margin:0px 5px 0px auto;width:fit-content;">
<label>Other servers</label>
<input type="checkbox" onchange="admin()" id="admin">
<input type="checkbox" onchange="admin(this)" id="admin">
</div>
<div id="list"></div>
<div class="pages">
Expand Down Expand Up @@ -103,9 +103,9 @@
}
})
})
function admin() {
function admin(that) {
let nq = new URLSearchParams(location.search);
nq.set('admin', String(this.checked));
nq.set('admin', String(that.checked));
nq.set('page', '1')
location.href = location.origin+location.pathname+'?'+nq.toString();
}
Expand Down

0 comments on commit 9d652b5

Please sign in to comment.