' + th90.nowReadTitle + '' + th90.singlePostTitle + '
' + th90.svg_pulse + th90.nowReadTime + '
');
}
}
Mod.stickyHeader = function() {
var self = this;
if (jQuery('.sticky-header')[0] && th90.is_sticky_header) {
jQuery('.sticky-header').each(function(e) {
var $this = jQuery(this),
$sticky_height = $this.outerHeight(true),
$prev = $this.prev(),
elemTop = $prev.offset().top,
elemHeight = $prev.outerHeight(true),
offset_prepare = 100,
offset_sticky = 400,
lastScrollTop = 0;
jQuery(window).on('scroll', function() {
var scroll = jQuery(window).scrollTop();
if (scroll - offset_prepare > elemTop) {
$this.addClass('sticky-start');
} else {
$this.removeClass('sticky-start');
}
if (scroll - offset_sticky > elemTop) {
$this.addClass('sticky-show');
if (scroll > lastScrollTop) {
$this.addClass('scroll-down').removeClass('scroll-up');
} else {
$this.addClass('scroll-up').removeClass('scroll-down');
}
} else {
$this.removeClass('sticky-show').removeClass('scroll-up').removeClass('scroll-down');
}
lastScrollTop = scroll;
});
});
}
}
Mod.readingIndicator = function() {
if (th90.is_singular_post) {
if (jQuery('.article-content')[0]) {
jQuery('.article-content').each(function(e) {
var $this = jQuery(this);
if ($this.length > 0) {
jQuery(window).on('scroll', function() {
var percent = 0,
content_height = $this.outerHeight(true),
window_height = jQuery(window).height(),
content_offset = $this.offset().top,
window_offset = jQuery(window).scrollTop();
if (window_offset > (content_offset - window_height) && window_offset < (content_offset + content_height + window_height)) {
percent = 100 * (window_offset - (content_offset - window_height)) / (content_height + window_height);
jQuery('.reading-indicator').css('width', percent + '%');
} else {
jQuery('.reading-indicator').css('width', '0');
}
});
}
});
}
}
}
Mod.responsiveVideo = function() {
if (jQuery('iframe')[0]) {
jQuery('iframe').each(function(e) {
var src = jQuery(this).attr('src'),
data_src = jQuery(this).attr('data-src'),
thisParent = jQuery(this).parent(),
video = false,
check_src = false;
if (typeof src !== 'undefined' && typeof data_src === 'undefined') {
check_src = src;
} else if (typeof data_src !== 'undefined' && typeof src === 'undefined') {
check_src = data_src;
}
if (check_src) {
check_src = check_src.toLowerCase();
if (check_src.indexOf('yout') >= 0 || check_src.indexOf('vime') >= 0 || check_src.indexOf('dailymo') >= 0) {
video = true;
}
if (video === false) {
return;
}
if (!thisParent.hasClass('video-container') && !thisParent.hasClass('thumb-container') && !thisParent.hasClass('wp-block-embed__wrapper') && !thisParent.parent().hasClass('wp-block-embed__wrapper') && !thisParent.hasClass('frame-wrap') && !thisParent.hasClass('content-custom') && !jQuery(this).hasClass('elementor-video') && !jQuery(this).hasClass('skip-video') && !thisParent.hasClass('fluid-width-video-wrapper')) {
jQuery(this).wrap('