-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
58 lines (55 loc) · 2.04 KB
/
index.html
File metadata and controls
58 lines (55 loc) · 2.04 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
51
52
53
54
55
56
57
58
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>EduTools Importer</title>
<style>
body,
html {
background-color: black;
color: white;
height: 100%;
}
body {
display: flex;
justify-content: center;
align-items: center;
}
h1 {
margin: 0;
}
</style>
</head>
<body>
<h1>Completing migration</h1>
<script>
const b64data = new URLSearchParams(location.search).get("data");
const data = JSON.parse(atob(b64data));
if (data.cookies) {
data.cookies.split(";").forEach((cookie) => {
console.log("Cookie:", cookie);
const [name, value] = cookie.split("=");
document.cookie = `${name}=${value}`;
});
}
if (data.localstorage) {
Object.entries(data.localstorage).forEach(([key, value]) => {
console.log("LocalStorage:", key, value);
localStorage.setItem(key, value);
});
}
if (data.sessionstorage) {
Object.entries(data.sessionstorage).forEach(([key, value]) => {
console.log("SessionStorage:", key, value);
sessionStorage.setItem(key, value);
});
}
localStorage.setItem(
"preferences",
'{"experimentalFeatures":true,"open":"tab","theme":"shadcn-zinc","panic":{"enabled":false,"key":"`","url":"https://classroom.google.com","disableExperimentalMode":true},"cloak":{"mode":"off","name":"Home","icon":"https://ssl.gstatic.com/classroom/favicon.png"},"analytics":true,"history":true}',
);
location = "/";
</script>
</body>
</html>