-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathclear-storage.html
More file actions
50 lines (46 loc) · 1.86 KB
/
Copy pathclear-storage.html
File metadata and controls
50 lines (46 loc) · 1.86 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<!DOCTYPE html>
<html>
<head>
<title>Clear TaskMaster Storage</title>
</head>
<body>
<h1>Clear TaskMaster Storage</h1>
<p>Open this file in your browser to clear the problematic localStorage data.</p>
<button onclick="clearStorage()">Clear Storage</button>
<div id="result"></div>
<script>
function clearStorage() {
try {
// Clear all TaskMaster related localStorage
const keys = [
'taskmaster-project-path',
'taskmaster-theme',
'taskmaster-positions',
'taskmaster-viewport',
'taskmaster-project-name',
'taskmaster-focus-on-active-task',
'taskmaster-dynamic-layout',
'taskmaster-default-start-path'
];
keys.forEach(key => {
const value = localStorage.getItem(key);
if (value) {
console.log(`Clearing ${key}: ${value}`);
localStorage.removeItem(key);
}
});
document.getElementById('result').innerHTML = '<p style="color: green;">Storage cleared successfully! You can now close this page and reload the TaskMaster app.</p>';
} catch (error) {
document.getElementById('result').innerHTML = '<p style="color: red;">Error clearing storage: ' + error.message + '</p>';
}
}
// Auto-run on page load
window.onload = function() {
const path = localStorage.getItem('taskmaster-project-path');
if (path) {
document.getElementById('result').innerHTML = '<p>Current stored path: ' + path + '</p>';
}
};
</script>
</body>
</html>