-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cookie.js
240 lines (229 loc) · 17.2 KB
/
Cookie.js
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
//This is made by obviousAlexC and yes the account that made this pull request is his school account!
//Please give credit before using.
(function(Scratch) {
'use strict';
class Cookie {
getInfo() {
return {
"id": "cookie",
"name": "Scratch Cookies",
"color1":'#755848',
"color2":'#5c473b',
"color3":'#1c1612',
"blockIconURI": "data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHdpZHRoPSIxNTkuMTY2NjciIGhlaWdodD0iMTU5LjE2NjY3IiB2aWV3Qm94PSIwLDAsMTU5LjE2NjY3LDE1OS4xNjY2NyI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTE2MC40MTY2NywtMTAwLjQxNjY3KSI+PGcgZGF0YS1wYXBlci1kYXRhPSJ7JnF1b3Q7aXNQYWludGluZ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ExNTEsNS42ODY4NSAzLjE0OTg3LDguMDI2NzVjMi44Nzg5OCw2LjQ4NzY0IDkuMjU0Nyw5Ljk1MzI4IDE0LjI0MDU3LDcuNzQwNzJ6IiBmaWxsPSIjMzgzMjMwIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMCIvPjxwYXRoIGQ9Ik0xNzcuMDIwNDgsMTg0LjY1MDQ2YzEuMDA2MzMsNS4zNjExMiA3LjQ3NzIyLDguNjQ1NjYgMTQuNDUzMTQsNy4zMzYyMWM2Ljk3NTkxLC0xLjMwOTQ0IDExLjgxNTIxLC02LjcxNyAxMC44MDg4OCwtMTIuMDc4MTJjLTAuNjQzMzgsLTMuNDI3NTIgLTIuMTAyNTQsLTcuNDgzMTUgLTUuOTE3MDcsLTguNTU1MjRjLTIuMTUxOTMsLTAuNjA0ODEgLTYuMDIwMDYsMC43NDY3NSAtOC41MzYwNiwxLjIxOTAzYy02Ljk3NTkxLDEuMzA5NDQgLTExLjgxNTIxLDYuNzE2OTkgLTEwLjgwODg4LDEyLjA3ODExeiIgZmlsbD0iIzM4MzIzMCIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjAiLz48L2c+PC9nPjwvc3ZnPjwhLS1yb3RhdGlvbkNlbnRlcjo3OS41ODMzMzMzMzMzMzMzNDo3OS41ODMzMzMzMzMzMzMzNC0tPg==",
"blocks": [
{
"opcode": "makecookie",
"blockType": "command",
"text": "Make cookie of name [b] with value of [v] and an expiration date of [e] (in UTC time)",
"arguments": {
"b": {
"type": "string",
"defaultValue": "Cookie Name"
},
"v": {
"type": "string",
"defaultValue": "Cookie Value"
},
"e": {
"type": "string",
"defaultValue": "Expiration date"
}
}
},
{
"opcode": "makecookiepath",
"blockType": "command",
"text": "Make cookie of name [b] with value of [v] and an expiration date of [e] (in UTC time) and a path of [p]",
"arguments": {
"b": {
"type": "string",
"defaultValue": "Cookie Name"
},
"v": {
"type": "string",
"defaultValue": "Cookie Value"
},
"e": {
"type": "string",
"defaultValue": "Expiration date"
},
"p": {
"type": "string",
"defaultValue": "path"
}
}
},
{
"opcode": "readcookieofname",
"blockType": "reporter",
"text": "read cookie by the name of [c]",
"arguments": {
"c": {
"type": "string",
"defaultValue": "Cookie Name"
}
}
},
{
"opcode": "doescookieexist",
"blockType": "Boolean",
"text": "does cookie by the name of [c] exist?",
"arguments": {
"c": {
"type": "string",
"defaultValue": "Cookie Name"
}
}
},
{
"opcode": "delcookie",
"blockType": "command",
"text": "Delete cookie of name [b] and the path of [p]",
"arguments": {
"b": {
"type": "string",
"defaultValue": "Cookie Name"
},
"p": {
"type": "string",
"defaultValue": "Cookie Path"
}
}
}
],
};
}
makecookie({b,v,e}) {
return document.cookie = "CookieExtensionScratch"+b + "=" + v + "; expires=" + e;
}
makecookiepath({b,v,e,p}) {
return document.cookie = "CookieExtensionScratch"+b + "=" + v + "; expires=" + e + "; path=/" + p;
}
readcookieofname({c}) {
let name = "CookieExtensionScratch"+c + "=";
let decodedCookie = decodeURIComponent(document.cookie);
let ca = decodedCookie.split(';');
for(let i = 0; i <ca.length; i++) {
let ck = ca[i];
while (ck.charAt(0) == ' ') {
ck = ck.substring(1);
}
if (ck.indexOf(name) == 0) {
return ck.substring(name.length, ck.length);
}
}
return "Cookie not found";
}
doescookieexist({c}) {
let name = "CookieExtensionScratch"+c + "=";
let decodedCookie = decodeURIComponent(document.cookie);
let ca = decodedCookie.split(';');
for(let i = 0; i <ca.length; i++) {
let ck = ca[i];
while (ck.charAt(0) == ' ') {
ck = ck.substring(1);
}
if (ck.indexOf(name) == 0) {
return "true"
}
}
return "false"
}
delcookie({b,p}) {
return document.cookie = "CookieExtensionScratch"+b + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/" + p;
}
}
class LocalStorageEX {
getInfo() {
return {
"id": "localstore",
"name": "Local Storage",
"color1":'#5cc4ba',
"color2":'#4da39b',
"color3":'#3d8079',
"blockIconURI": "data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPS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5Mjk4LC02LjE5Mjk4YzAsLTMuNDIwMjkgLTIuNzcyNjksLTYuMTkyOTggLTYuMTkyOTgsLTYuMTkyOThjLTMuNDIwMjksMCAtNi4xOTI5OCwyLjc3MjY5IC02LjE5Mjk4LDYuMTkyOThjMCwzLjQyMDI5IDIuNzcyNjksNi4xOTI5OCA2LjE5Mjk4LDYuMTkyOTh6TTI1OS41OTI5NiwxNzAuNDA4MjFjMy40MjAyOSwwIDYuMTkyOTgsLTIuNzcyNjkgNi4xOTI5OCwtNi4xOTI5OGMwLC0zLjQyMDI5IC0yLjc3MjY5LC02LjE5Mjk4IC02LjE5Mjk4LC02LjE5Mjk4Yy0zLjQyMDI5LDAgLTYuMTkyOTgsMi43NzI2OSAtNi4xOTI5OCw2LjE5Mjk4YzAsMy40MjAyOSAyLjc3MjY5LDYuMTkyOTggNi4xOTI5OCw2LjE5Mjk4eiIvPjwvZz48L2c+PC9nPjwvc3ZnPg==",
"blocks": [
{
"opcode": "lssetitem",
"blockType": "command",
"text": "Local storage set item of name [i] to [v]",
"arguments": {
"i": {
"type": "string",
"defaultValue": "Item Name"
},
"v": {
"type": "string",
"defaultValue": "Item Value"
}
}
},
{
"opcode": "lsgetitem",
"blockType": "reporter",
"text": "Local Storage get item of name [n]",
"arguments": {
"n": {
"type": "string",
"defaultValue": "Item Name"
}
}
},
{
"opcode": "lsdoesitemexist",
"blockType": "Boolean",
"text": "does item [i] exist in the Local Storage?",
"arguments": {
"i": {
"type": "string",
"defaultValue": "Item Name"
}
}
},
{
"opcode": "lsremoveitem",
"blockType": "command",
"text": "Local Storage remove item [i]",
"arguments": {
"i": {
"type": "string",
"defaultValue": "Item Name"
}
}
},
{
"opcode": "lslength",
"blockType": "reporter",
"text": "Length of Local Storage",
"arguments": {
}
}
],
};
}
//Local Storage Update :)
lssetitem({i,v}) {
return localStorage.setItem("LocalStorageExtension-Scratch-"+i, v);
}
lsgetitem({n}) {
return localStorage.getItem("LocalStorageExtension-Scratch-"+n)
}
lsremoveitem({i}) {
return localStorage.removeItem("LocalStorageExtension-Scratch-"+i);
}
lsdoesitemexist({i}) {
let name = localStorage.getItem("LocalStorageExtension-Scratch-"+i);
if(name){
return true;
}else{
return false;
}
}
lslength({}) {
return localStorage.length;
}
}
Scratch.extensions.register(new Cookie());
Scratch.extensions.register(new LocalStorageEX());
})(Scratch);