homeslice icon indicating copy to clipboard operation
homeslice copied to clipboard

Pre-populate via URL

Open kfdm opened this issue 11 years ago • 1 comments

One option of http://worldchatclock.com/ that I really appreciate, is the ability to link to an already filled out clock. It seems like it should be possible to do something similar here.

I do not fancy myself as a javascript developer, but since this is a feature I would really like, I'm willing to give it a shot. Do you have any suggestions on how you would like to see it implemented, or any hints into the code on where it should hook in? It seems like the core bit of the code is all contained in here https://github.com/andytlr/homeslice/blob/gh-pages/assets/app.js

kfdm avatar Nov 03 '14 01:11 kfdm

@kfdm Sorry I need to turn on email notifications again.

It's a nice idea. Originally I only used query strings to set cities. Then switched to cookies. But you could perhaps check if there's a query string, and if so, replace the cookie.

So if you went to http://homeslice.in/ it would remember your last cities but if you went to http://homeslice.in/?melbourne&newyork&london it would set those cities in the cookie.

The problem is how people wouldn't know to add that to the URL. So you'd have to have mirror the cities set in the cookie, in the query string.

andytlr avatar Jan 09 '15 20:01 andytlr