Discuss Scratch

Sheep_maker
Scratcher
1000+ posts

The Data:Text Topic!

mybearworld wrote:

Sheep_maker wrote:

Eh, that will break soon
How so? Non-base64 data URLs are relied upon by many websites for inline SVGs in CSS (as it's more compact), so it's unlikely that browser support for them will go any time soon.
mybearworld
Scratcher
1000+ posts

The Data:Text Topic!

Sheep_maker wrote:

[View post]

mybearworld wrote:

Sheep_maker wrote:

Eh, that will break soon
How so? Non-base64 data URLs are relied upon by many websites for inline SVGs in CSS (as it's more compact), so it's unlikely that browser support for them will go any time soon.
Ah, I didn't mean “soon” like that xD
I meant it like “when you continue programming it”, if you use, say, /
Sheep_maker
Scratcher
1000+ posts

The Data:Text Topic!

mybearworld wrote:

Sheep_maker wrote:

Ah, I didn't mean “soon” like that xD
I meant it like “when you continue programming it”, if you use, say, /
Well, the code sample I gave uses /, and it works fine.

It does break if you use non-ASCII characters, which is why I usually set the character encoding to UTF-8:
data:text/html;charset=UTF-8,<style>:root { color-scheme: dark }</style><h1><a href="%23"><ruby><rt>yáng</rt></ruby></a></h1><input type="text" placeholder="lol">

Among the characters that won't work are #, but that mostly occurs in CSS or URLs, and I can just insert %23 instead of using a base64 encoder whilst still maintaining general readability

Last edited by Sheep_maker (May 7, 2021 18:12:24)

hello_smile
Scratcher
1000+ posts

The Data:Text Topic!

Oh, the built-in iOS IDE. I wrote the beginnings of a web-based JavaScript OS in the URL bar. Really. On iOS 12.
Ciyob86
Scratcher
500+ posts

The Data:Text Topic!

I made a scratch project that automatically makes base64 encoded data url's
hello_smile
Scratcher
1000+ posts

The Data:Text Topic!

Ciyob86 wrote:

I made a scratch project that automatically makes base64 encoded data url's
Automatically? Your grammar sounds a bit off.
DifferentDance8
Scratcher
1000+ posts

The Data:Text Topic!

hello_smile wrote:

Your grammar sounds a bit off.
WARNING: That url will log you out of your Microsoft account without asking!
PoIygon
Scratcher
1000+ posts

The Data:Text Topic!

DifferentDance8 wrote:

hello_smile wrote:

Your grammar sounds a bit off.
WARNING: That url will log you out of your Microsoft account without asking!
Forgot this even existed
DifferentDance8
Scratcher
1000+ posts

The Data:Text Topic!

PoIygon wrote:

Forgot this even existed
Me too.
silvxrcat
Scratcher
500+ posts

The Data:Text Topic!

hello_smile wrote:

Ciyob86 wrote:

I made a scratch project that automatically makes base64 encoded data url's
Automatically? Your grammar sounds a bit off.
:troll:

I do want to see that project though, it sounds cool!
MagicCrayon9342
Scratcher
1000+ posts

The Data:Text Topic!

DifferentDance8 wrote:

hello_smile wrote:

Your grammar sounds a bit off.
WARNING: That url will log you out of your Microsoft account without asking!
does it log me out or steal my password? i clicked it
mybearworld
Scratcher
1000+ posts

The Data:Text Topic!

MagicCrayon9342 wrote:

does it log me out or steal my password? i clicked it
It… couldn't be more obvious. The link literally says https://login.microsoftonline.com/auth/logout#dontask

Last edited by mybearworld (Sept. 6, 2022 04:24:30)

ZZC12345
Scratcher
500+ posts

The Data:Text Topic!

mybearworld wrote:

MagicCrayon9342 wrote:

does it log me out or steal my password? i clicked it
It… couldn't be more obvious. The link literally says https://login.microsoftonline.com/auth/logout#dontask
Aka, log me out from Microsoft Online and don't ask me about it.
DifferentDance8
Scratcher
1000+ posts

The Data:Text Topic!

I suppose it would be possible to embed a sort-of rickroll or another bait and switch using data:text, but it all get's super weird and stuff, so

Powered by DjangoBB