PluginProbe
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant / 1.6
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant v1.6
2.3.2 2.3.1 2.3.0 2.2.8 2.2.7 trunk 1.10.0 1.10.1 1.10.2 1.10.3 1.10.4 1.10.5 1.11.0 1.11.1 1.11.2 1.6 1.7 1.8 1.8.1 1.8.2 1.8.3 1.9.0 1.9.1 1.9.10 1.9.11 All 60 releases
merchant / assets / js / modules / countdown-timer / countdown-timer.min.js

countdown-timer.min.js in Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant 1.6, at assets/js/modules/countdown-timer/countdown-timer.min.js

1 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 "use strict";!function(a,r){function o(t,e,n){var a=new Date,n=(a.setTime(a.getTime()+24*n*60*60*1e3),"expires="+a.toUTCString());r.cookie=t+"="+e+";"+n+";path=/"}function i(t){for(var e=r.cookie.split(";"),n=0;n<e.length;n++){var a=e[n].split("="),o=a[0].trim(),a=a[1].trim();if(o===t)return decodeURIComponent(a)}return null}function c(){T(0),h(g),t(),u.hide()}var u,m,s,d,f="merchant-countdown-timer",g="merchant_countdown_timer_date",w="merchant_countdown_timer_cool_off_date",h=function(t){r.cookie=t+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;"},p=function(){var t=(new Date).getTime(),e=s.getTime(),n=d.getTime();t<e?T(n-t):c()},T=function(t){var e=Math.floor(t/864e5),n=Math.floor(t%864e5/36e5).toString().padStart(2,"0"),a=Math.floor(t%36e5/6e4).toString().padStart(2,"0"),o=Math.floor(t%6e4/1e3).toString().padStart(2,"0");r.getElementById(f).innerHTML="".concat(e," days ").concat(n,":").concat(a,":").concat(o),0<t&&setTimeout(p,1e3)},t=function(){var t;i(w)||((t=new Date).setMinutes(t.getMinutes()+parseInt(u.attr("data-cop"))),o(w,t,1))};a(r).ready(function(){var t,e,n;(u=a(".merchant-countdown-timer")).length&&(e=(t=parseInt(u.attr("data-max")))-parseInt(u.attr("data-min")),n=!0,i(w)&&(new Date(i(w))<(new Date).getTime()?h(w):n=!1),n)&&(u.show(),i(g)?m=new Date(i(g)):(m=new Date,o(g,m,9)),(d=new Date(m.getTime())).setHours(d.getHours()+t),(s=new Date(m.getTime())).setHours(s.getHours()+e),p())})}(jQuery,(window,document));