CoolClock icon indicating copy to clipboard operation
CoolClock copied to clipboard

New fork

Open plp13 opened this issue 11 years ago • 6 comments

I needed to have this code working properly for me, so I forked it and made lots of changes to it.

The most important new features are:

  • Works properly with recent versions of IE (and not at all with old ones about which I don't really care)
  • Clock title
  • Proper skins for digital clock and clock title
  • Synchronize with web server clock
  • Fixes in README.md

Have a look at it if you want.

plp13 avatar Dec 11 '13 20:12 plp13

Seems good! I'm very happy to drop that excanvas stuff. l'll take a closer look soon.

(Unrelated to this pull request), what do you think about using data attributes for the parameters (instead of the class hackery)? eg <canvas id="clockid" data-skin="swissRail" data-offset="+2" data-show-digital="true" ... etc>

or maybe

eg <canvas id="clockid" data-skin="swissRail" data-offset="+2" data-opts="digital:noSeconds" ... etc>

simonbaird avatar Dec 11 '13 21:12 simonbaird

Yes, of course. Using attributes would be much better. Now someone needs to do it. :-)

Regarding excanvas:

I simply removed everything that mentioned excanvas, along with all IE specific code. And it works fine with IE 9+, and also with Firefox, Chromium, and Opera. Then I added an if statement at the top of findAndCreateClocks() so that old browsers such as IE 8 won't come up with a JavaScript error.

Personally, I can live with my web site not showing the clock to IE 8 users. Though maybe others can't...

plp13 avatar Dec 12 '13 10:12 plp13

I've done the attributes thing, if you would like to take a look.

plp13 avatar Dec 18 '13 20:12 plp13

+1 Is this going to get pulled in? There are a few improvements I would like to make.

seanzx85 avatar Jan 23 '14 15:01 seanzx85

Hi SeanZX85,

I'm pretty interested in this project and I'm planning to use it extensively for a site I'm building. May I ask what the improvements you are working on are?

plp13 avatar Jan 24 '14 07:01 plp13

@plp13 I would fix the attribute tagging to be HTML compliant from your branch. Also do some working on time offsets. And remove the clock styles, to trim it down. Hopefully add AMD support as well for requireJS.

However, my project will most likely be moving to a pure CSS clock. I should know more in the next few days about if I will have time to develop this.

seanzx85 avatar Jan 30 '14 18:01 seanzx85