-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebug-localStorage.html
More file actions
36 lines (32 loc) · 1.27 KB
/
debug-localStorage.html
File metadata and controls
36 lines (32 loc) · 1.27 KB
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
36
<!DOCTYPE html>
<html>
<head>
<title>Debug localStorage</title>
</head>
<body>
<h1>Debug localStorage Check</h1>
<div id="output"></div>
<button onclick="clearDebugStorage()">Clear Debug Storage</button>
<script>
function checkLocalStorage() {
const output = document.getElementById('output');
const debugGraphics = localStorage.getItem('blasteroids-debug-graphics');
const debugZone = localStorage.getItem('blasteroids-debug-zone');
const debugGifts = localStorage.getItem('blasteroids-debug-gifts');
output.innerHTML = `
<p><strong>Debug Graphics:</strong> ${debugGraphics || 'not set'}</p>
<p><strong>Debug Zone:</strong> ${debugZone || 'not set'}</p>
<p><strong>Debug Gifts:</strong> ${debugGifts || 'not set'}</p>
`;
}
function clearDebugStorage() {
localStorage.removeItem('blasteroids-debug-graphics');
localStorage.removeItem('blasteroids-debug-zone');
localStorage.removeItem('blasteroids-debug-gifts');
checkLocalStorage();
alert('Debug localStorage cleared!');
}
checkLocalStorage();
</script>
</body>
</html>