1(function ($) { 2 $.fn.lp_course_countdown = function () { 3 var countdowns = this; 4 5 for (var i = 0; i < countdowns.length; i++) { 6 var _countdown = $(countdowns[i]); 7 var speed = _countdown.attr('data-speed'); 8 var remain = parseInt(_countdown.attr('data-timestamp-remain'))*1000; 9 var gmt = _countdown.attr( 'data-gmt' ); 10 var time = _countdown.attr('data-time'); 11 var showtext = _countdown.attr('data-showtext'); 12 var current_time = new Date(); 13 var expiryTime = current_time.getTime()+remain; 14 var expiryDate = new Date(expiryTime); 15 var gmt = -expiryDate.getTimezoneOffset() / 60; 16 var options = { 17 expiryDate : expiryDate, 18 speed : speed ? speed : 500, 19 gmt : parseFloat(gmt), 20 showText : (showtext=='yes') ? 1 : 0, 21 localization: { 22 days: lp_coming_soon_translation.days, 23 hours: lp_coming_soon_translation.hours, 24 minutes: lp_coming_soon_translation.minutes, 25 seconds: lp_coming_soon_translation.seconds 26 } 27 }; 28 _countdown.mbComingsoon(options); 29 } 30 }; 31 32 $(document).ready(function () { 33 $('.learnpress-course-coming-soon').lp_course_countdown(); 34 if (typeof tinymce !== 'undefined') { 35 setTimeout(function () { 36 var $editor_cm = tinymce.get('_lp_coming_soon_msg'); 37 if ($editor_cm) { 38 $editor_cm.on('Change KeyUp', function (e, b) { 39 $('#' + this.settings.id).val(this.getContent()) 40 }); 41 } 42 }, 1000); 43 } 44 }); 45 46})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.