-
Notifications
You must be signed in to change notification settings - Fork 0
/
tools.html
35 lines (35 loc) · 1000 Bytes
/
tools.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="theme-color" content="">
<link rel="shortcut icon" href="/icon.svg">
<link rel="stylesheet" href="">
<title>Tools</title>
</head>
<button id=unreg>unregister</button>
<button id="clear">clear</button>
<input type="checkbox" id="nosw">
<label for="nosw">Disable Service Worker</label>
<body>
<script>
unreg.onclick = () => {
navigator.serviceWorker.getRegistrations().then(registrations => {
for (const registration of registrations) {
registration.unregister();
}
});
caches.delete("cached-responses")
}
clear.onclick = () => {
localStorage.removeItem("cmds")
}
nosw.checked = !!localStorage.getItem("nosw")
nosw.onchange = e => {
localStorage.setItem("nosw", nosw.checked ? "true" : "")
}
</script>
</body>
</html>