New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

clock-timer

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clock-timer

clock-timer Filter algorithm in JavaScript.

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

clock-timer

Display a really basic animated clock with JavaScript.

Demo

http://lab.miguelmota.com/clock-timer

Usage

HTML

<div class="clock">
  <canvas id="days-canvas"></canvas>
  <label><span id="days-count"></span> Days</label>
</div>

<div class="clock">
  <canvas id="hours-canvas"></canvas>
  <label><span id="hours-count"></span> Hours</label>
</div>

<div class="clock">
  <canvas id="minutes-canvas"></canvas>
  <label><span id="minutes-count"></span> Minutes</label>
</div>

<div class="clock">
  <canvas id="seconds-canvas"></canvas>
  <label><span id="seconds-count"></span> Seconds</label>
</div>

CSS

.clock {
  display: inline-block;
  position: relative;
  margin: 0 15px;
  text-align: center;
}

label {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100px;
  margin: -10px 0 0 -50px;
  text-align: center;
}

JavaScript

<script src="clock.js"></script>

<script>
var options = {
  endDate: "12/31/2013 24:00:00" // UTC
};

window.clock = new ClockTimer( options );
</script>

All Options

var defaults = {

  startDate: null,
  endDate: null,

  secondsCanvas: true,
  minutesCanvas: true,
  hoursCanvas: true,
  daysCanvas: true,

  secondsCanvasSelector: "#seconds-canvas",
  minutesCanvasSelector: "#minutes-canvas",
  hoursCanvasSelector: "#hours-canvas",
  daysCanvasSelector: "#days-canvas",

  secondsCountSelector: "#seconds-count",
  minutesCountSelector: "#minutes-count",
  hoursCountSelector: "#hours-count",
  daysCountSelector: "#days-count",

  secondsStrokeStyle: "#000",
  minutesStrokeStyle: "#000",
  hoursStrokeStyle: "#000",
  daysStrokeStyle: "#000",

  lineWidth: 15,

  radius: 100,

};

License

Released under the MIT License.

Keywords

FAQs

Package last updated on 11 Jun 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc