Commit e75cc08
Added Both Revoke and Read function to the Blob Extension (#439)
* Added Both Revoke and Read function
TheShovel, what's up pookie ;P
* Fixed Unsafe stuff
* Switched to DataView [and more small fixes]
I couldn't remove that one loop and I spent a long time trying to do so, if you have any more stuff you would like me to change I would be more than happy to do so
* Update Blobs.js
* Use encoding types instead of just using plaintext.
Here's some bullet points on what this does:
* Allow extension users to choose what they want to be outputted, rather
than deciding automatically based on the MIME.
* Correct base64 encoding: encoding through first writing it to a string
is not only a relatively slow way of doing such, but is also not safe,
due to the potential for data loss.
* Added 4 encoding types, available in both the read and write blocks
for blob URLs: base 64, data URL, plain text, byte array.
* Base 64 reads it as base 64; note: not a string encoded to base 64,
but as binary data that was base 64 encoded.
* Data URL resolves the data URL and uses its content to write to the
object URL.
* Plaintext just takes in the input as plaintext, just as it was done
before.
* Byte array takes in an array of numbers that are between 0 and 255
and reads it as a string of bytes. Outputted as a JSON string so as
to be compatible with other extensions such as Arrays.
---------
Co-authored-by: Steve0Greatness <steve0greatnessiscool@gmail.com>1 parent aaf9b5a commit e75cc08
1 file changed
+104
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
31 | 31 | | |
32 | 32 | | |
33 | 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 | + | |
34 | 64 | | |
35 | 65 | | |
36 | 66 | | |
37 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
38 | 77 | | |
39 | 78 | | |
40 | 79 | | |
| |||
102 | 141 | | |
103 | 142 | | |
104 | 143 | | |
105 | | - | |
106 | | - | |
107 | | - | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
108 | 167 | | |
109 | | - | |
| 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 | + | |
110 | 200 | | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
111 | 210 | | |
112 | 211 | | |
0 commit comments