2021年07月08日16:16

視頻精選

“;
str2 = “

googletag.cmd.push(function() { googletag.display(‘div-gpt-ad-1603180805072-0’); });“+”ipt>

“;
str2 += “

googletag.cmd.push(function() { googletag.display(‘div-gpt-ad-1520571530862-14’); });“+”ipt>

“;
str3a = “

googletag.cmd.push(function() { googletag.display(‘div-gpt-ad-1558083129979-0’); });“+”ipt>

“;
str3 = ‘‘;

if( $(‘#news-body div.news-main-inline-image’).length > 0 )
{
var count = 0;
var pTopHeight = 0;
var lastIndex = $(“#news-body”).children(“div.news-main-inline-image,p,figure.wp-caption,div.img_wrapper”).length – 1;
var first = false;
var second = false;
var third = false;
var height = parseInt( $(‘#news-body div.news-main-inline-image’).width() * 0.6 );

$(“#news-body”).children(“div.news-main-inline-image,p,figure.wp-caption,div.img_wrapper”).each(function(index, el) {

if( index == lastIndex && !second )
{
$(str2).insertAfter($(el));
return true;
}

if( !first && $(el).is(‘:empty’) )
{
first = true;
return true;
}

if( count == 0 )
{
$(str1).insertAfter($(el));
count++;
}
else
{
if( $(el).is(‘p’) )
{
pTopHeight += $(el).height() + parseInt($(el).css(“padding-top”)) + parseInt($(el).css(“padding-bottom”));
}
else
{
pTopHeight += height;
}

if( !second )
{
if( pTopHeight > 400)
{
$(str2).insertAfter($(el));
second = true;
pTopHeight = 0;
}
}
else
{
if( pTopHeight > 600)
{
if( !third )
{
$(str3a).insertAfter($(el));
third = true;
}
else
{
$(str3).insertAfter($(el));
(adsbygoogle = window.adsbygoogle || []).push({});
}
pTopHeight = 0;
}
}

if( pTopHeight > 600)
{
if( !second )
{
$(str2).insertAfter($(el));
second = true;
}
else
{
if( !third )
{
$(str3a).insertAfter($(el));
third = true;
}
else
{
$(str3).insertAfter($(el));
(adsbygoogle = window.adsbygoogle || []).push({});
}
}
pTopHeight = 0;
}
}
});
}
else if( $(‘#news-body .ipop_wrapper’).length > 0 )
{
var count = 0;
var frist = false;
var second = false;
var third = false;
$(“#news-body .ipop_wrapper”).children(“p”).each(function(index, el)
{
if( $(el).find(‘img’).length > 0 || $(el).children(‘video’).length )
{
if( count == 0)
{
$(str1).insertAfter($(el));
frist = true;
}
else if( count == 3 )
{
$(str2).insertAfter($(el));
second = true;
}
else if( count % 3 == 0 )
{
if( frist && second )
{
if( !third )
{
$(str3a).insertAfter($(el));
third = true;
}
else
{
$(str3).insertAfter($(el));
(adsbygoogle = window.adsbygoogle || []).push({});
}
}
}
count++;
}
});
}
else
{
var pTopHeight = 0;
var realPos = 0;
var second = false;
var third = false;
var lastIndex = $(“#news-body p”).length – 1;

$(“#news-body p”).each(function(index, el) {

if( index == lastIndex && !second )
{
$(str2).insertAfter($(el));
return true;
}

if( $(el).is(‘:empty’) )
{
return true;
}

if( realPos == 0 )
{
$(str1).insertAfter($(el));
realPos++;
}
else if( realPos == 1 )
{
$(str2).insertAfter($(el));
second = true;
realPos++;
}
else
{
pTopHeight += $(el).height() + parseInt($(el).css(“padding-top”)) + parseInt($(el).css(“padding-bottom”));
if( pTopHeight > 400)
{
if( !third )
{
$(str3a).insertAfter($(el));
third = true;
}
else
{
$(str3).insertAfter($(el));
(adsbygoogle = window.adsbygoogle || []).push({});
}
pTopHeight = 0;
}
}
});
}
})(jQuery);

Source

作者: HK in UK