Live data from Hacker News

Animating URLs with JavaScript and Emojis

matthewrayfield.com

71–80 of 173 posts

Re: Animating URLs with JavaScript and Emojis

#71
post #38

Earlier quoted context omitted.

The spirit is there definitely. My take is that it's only a matter of time before emojis creep into every area where text is used. Let's hope they won't ever become a mainstream part of programming languages.

I created a small library for Ruby/Rails that aliased a few methods with emojis. You could remove database objects by using the gun emoji, or trim a string with the scissors emoji.

This is pretty neat! Although, if I did it in my company, I would be packing my things very fast.

Re: Animating URLs with JavaScript and Emojis

#72
post #6
post #4

Earlier quoted context omitted.

Because it manipulated the hash component directly. By using the "replaceState" method of the history API [1] you could avoid polluting the browser's history. [1] https://developer.mozilla.org/en-US/docs/Web/API/History_API

Didn't the article say the history API was throttled on Chrome and Safari?

According to https://news.ycombinator.com/item?id=19682014 you can use replaceState without being throttled.

Re: Animating URLs with JavaScript and Emojis

#73
post #61

I love the creativity of the hack, especially when he sync'd the video position with the scrubber. Respect. I also love the guy's vaguely deranged, Adult Swim -inspired commentary. I went from hater to fan in about 30 seconds, once I realized that he must idolize Tim Heidecker. Again, respect. However, what I love the most is how the video was composited and edited. What tools do you use to pull that together without…

Youtube poops and endless music video memes are some of the best things to come out of the meme culture. Because folk culture is now truly ‘multimedia’ and we have a horde of people for whom hyperactive video and sound editing is second nature. Now just to wait for when it becomes mainstream and commoditized like graphics editing. I'm hoping for about the same fate for knowledge visualization techniques—might see it…

Indeed. I don't need it much, but the video and audio editing techniques I learned from making YTMNDs has been valuable.

Re: Animating URLs with JavaScript and Emojis

#74

Another perfect example of the childish activities of the web today. Remember the days when postings were about serious technical advancements and not random hobbyist activities?

What? Stuff like this is what made the web fun. At least he put it on his own blog instead of facebook.

Re: Animating URLs with JavaScript and Emojis

#76
post #59
post #17

This is very cute and all but... you know... don't actually do this! Please. Even if you make it so that it doesn't break the back button or history, URLs are things that people copy and paste and send to people. They are put into Word-documents, bookmarks and archive.org. It's not a place for dynamic animations. URLs should be static, simple, and as short as is reasonable.

That's not for you to decide.

All you can decide is what to do with the URLs that are given to you.

Re: Animating URLs with JavaScript and Emojis

#77
post #38

This reminds me of putting marquees in the window.status like 20 years ago

The spirit is there definitely. My take is that it's only a matter of time before emojis creep into every area where text is used. Let's hope they won't ever become a mainstream part of programming languages.

I remember a few years back a common hackathon project was to use lex and yacc to make emoji languages. It was always cool to see what people do with that. Maybe there will be an APL or something with emoji.

Re: Animating URLs with JavaScript and Emojis

#78
post #67

Earlier quoted context omitted.

In the article it does state that the history API could be used and why it wasn't. The first point about updating the whole URL is easy to render moot: when you push new state using the history API, replicate the effect of location.hash by making sure you only change the hash part. The second part is the sticky one for the "ain't this cool" factor: the throttle in some browsers effectively limits constant animation t…

All I know is he tried pushState. Perhaps replaceState is not throttled, because it doesn't create new history entries, just replaces the last one. Try this in chrome console. And yes, it doesn't throttle at all. i=0; setInterval(() => history.replaceState('', '', '/' + (i++)), 50); It's interesting how people will just believe everything, even if the test is 30 seconds away.

I'm pretty sure Chrome has different behavior with Dev Tools open and Dev Tools closed, and also with what it does with code posted in the console and code run as part of the page.

So just because it is not throttled when run in the console doesnt necessary imply it wont throttle as part of a regular page as well.

Re: Animating URLs with JavaScript and Emojis

#79

Another perfect example of the childish activities of the web today. Remember the days when postings were about serious technical advancements and not random hobbyist activities?

I mean if you mean ARPAnet then yeah. The web was always a place for creative people to meet and talk about the eccentric stuff they were into.

Re: Animating URLs with JavaScript and Emojis

#80
post #49

Earlier quoted context omitted.

Updating the hash of a URL doesn't (or shouldn't) make a request to the server, so your abstract employee hero is safe.

The abstract company villan has access to the locally stored history too.

That's what history.replaceState() instead of history.pushState() is for.
Post reply on HN