# countdown-time/1.0.6/dist/script.js

Countdown Timer Block – build urgency for events and launches, version 1.0.6. 2 lines.

- Page: https://pluginprobe.com/plugins/countdown-time/1.0.6/code/dist/script.js
- Raw: https://pluginprobe.com/plugins/countdown-time/1.0.6/raw/dist/script.js
- Modified: 2022-01-27T15:44:38+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/countdown-time/1.0.6/code/dist/script.js#L10-L20`.

```javascript
!function(){"use strict";var e=document.querySelectorAll(".wp-block-ctb-countdown-time");Object.values(e).map((function(e){var t=e.id,n=document.getElementById(t),o=JSON.parse(n.dataset.date).destDate,c=new Date(o).getTime();setInterval((function(){var e=(new Date).getTime(),n=c>e?(c-e)/1e3:0,o=Math.floor(n/86400),r=Math.floor(n%86400/3600),a=Math.floor(n%3600/60),i=Math.floor(n%60),u=document.querySelector("#".concat(t," .countdownDays .digit"));u&&(u.innerHTML=1===o.toString().length?("0"+o).slice(-2):o);var d=document.querySelector("#".concat(t," .countdownHours .digit"));d&&(d.innerHTML=("0"+r).slice(-2));var l=document.querySelector("#".concat(t," .countdownMinutes .digit"));l&&(l.innerHTML=("0"+a).slice(-2));var s=document.querySelector("#".concat(t," .countdownSeconds .digit"));s&&(s.innerHTML=("0"+i).slice(-2))}),1e3),null==n||n.removeAttribute("data-date")}))}();
//# sourceMappingURL=script.js.map
```
