PP 3

Download as rtf, pdf, or txt
Download as rtf, pdf, or txt
You are on page 1of 6

<script type='text/javascript' id='dfp_slot_details'>

var width = window.innerWidth || document.documentElement.clientWidth;


var adKey = "";
var dimArr = '';
var n1 = '';
var n2 = '';
var adtagsvalue = '';
//
var width = window.innerWidth || document.documentElement.clientWidth;
googletag.cmd.push(function() {
key = 'TECH2_ENG_DESKTOP/TECH2_ENG_NEWS/TECH2_ENG_NEWS_AS/TECH2
'TECH2_ENG_DESKTOP/TECH2_ENG_NEWS/TECH2_ENG_NEWS_AS/TECH2_ENG
'TECH2_ENG_DESKTOP/TECH2_ENG_NEWS/TECH2_ENG_NEWS_AS/TECH2_ENG
'TECH2_ENG_DESKTOP/TECH2_ENG_NEWS/TECH2_ENG_NEWS_AS/TECH2_ENG
'TECH2_ENG_DESKTOP/TECH2_ENG_NEWS/TECH2_ENG_NEWS_AS/TECH2_ENG
'TECH2_ENG_DESKTOP/TECH2_ENG_ROS/TECH2_ENG_ROS_ROS/TECH2_ENG_R
'TECH2_ENG_DESKTOP/TECH2_ENG_ROS/TECH2_ENG_ROS_ROS/TECH2_ENG_R
'TECH2_ENG_DESKTOP/TECH2_ENG_ROS/TECH2_ENG_ROS_ROS/TECH2_ENG_R
'TECH2_ENG_DESKTOP/TECH2_ENG_NEWS/TECH2_ENG_NEWS_AS/TECH2_ENG
'TECH2_ENG_DESKTOP/TECH2_ENG_NEWS/TECH2_ENG_NEWS_AS/TECH2_ENG
googletag.defineSlot('/1039154/FirstPost/Firstpost_Programmatic/Firstpost_Programmatic_
}

googletag.pubads().enableLazyLoad({
fetchMarginPercent: 200, // Fetch slots within 5 viewports.
renderMarginPercent: 200, // Render slots within 2 viewports.
mobileScaling: 1.5 // Double the above values on mobile.
});
googletag.enableServices();
//_w18sub();
});
</script>

<!-- DNS Prefetch -->


<link href="//b.scorecardresearch.com" rel="dns-prefetch"/>
<link href="//b.scorecardresearch.com" rel="preconnect"/>
<link href="https://securepubads.g.doubleclick.net" rel="dns-prefetch"/>
<link href="https://securepubads.g.doubleclick.net" rel="preconnect"/>
<link href="https://pubads.g.doubleclick.net" rel="dns-prefetch"/>
<link href="https://pubads.g.doubleclick.net" rel="preconnect"/>
<link href="https://www.google-analytics.com" rel="dns-prefetch"/>
<link href="https://www.google-analytics.com" rel="preconnect"/>
<link href="//www.googletagservices.com" rel="dns-prefetch"/>
<link href="//www.googletagservices.com" rel="preconnect"/>
<link href="//tpc.googlesyndication.com" rel="dns-prefetch"/>
<link href="//tpc.googlesyndication.com" rel="preconnect"/>
<link href="https://fonts.gstatic.com" rel="dns-prefetch"/>
<link href="https://fonts.gstatic.com" rel="preconnect"/>
<link href="//connect.facebook.net" rel="dns-prefetch" />
<link href="//connect.facebook.net" rel="preconnect" />
<link href="//static.xx.fbcdn.net" rel="dns-prefetch" />
<link href="//static.xx.fbcdn.net" rel="preconnect" />
<!-- DNS Prefetch Ends Here -->

<!-- Google Tag Manager -->


<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-MLJQLND');</script>
<!-- End Google Tag Manager -->

<script type="text/javascript">
/**
* author Remy Sharp
* url http://remysharp.com/2009/01/26/element-in-view-event-plugin/
* fork https://github.com/zuk/jquery.inview
*/
(function(e){function m(){var b=window.innerHeight;if(b)return b;var f=document.compat
1,b(),a=setTimeout(function(){a=null;c&&e()},f))}var c=!1,a=null;return e}(function(){var
g.push(this.handle.elem)});e(g).each(function(){var c=e(this),a;a=0;for(var d=this;d;d=d.off
(c.data("inview",a),c.trigger("inview",[!0,a]))):!g&&d&&(c.data("inview",!1),c.trigger("inv
</script>

<script type="text/javascript" src="//cdn.automatad.com/axt/ad_axt_explorer_firstpost_ga.j


<script src="https://www.firstpost.com/assets/js/tech2revamp/progressive-image.min.js?v=1
<script type='text/javascript'>
googletag.cmd.push(function() {
googletag.defineOutOfPageSlot('/1039154/FSTPST_ENG/FSTPST_ENG_ROS/FSTPST_E
googletag.defineOutOfPageSlot('/1039154/FSTPST_ENG/FSTPST_ENG_ROS/FSTPST_E
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
</script>
<!-- /1039154/FSTPST_ENG/FSTPST_ENG_ROS/FSTPST_ENG_ROS_AS/FSTPST_EN
<div id='FSTPST_ENG/FSTPST_ENG_ROS/FSTPST_ENG_ROS_AS/FSTPST_ENG_AS
<script>
googletag.cmd.push(function() { googletag.display('FSTPST_ENG/FSTPST_ENG_ROS/FS
</script>
</div>

<!-- /1039154/FSTPST_ENG/FSTPST_ENG_ROS/FSTPST_ENG_ROS_AS/FSTPST_EN
<div id='FSTPST_ENG/FSTPST_ENG_ROS/FSTPST_ENG_ROS_AS/FSTPST_ENG_AS
<script>
googletag.cmd.push(function() { googletag.display('FSTPST_ENG/FSTPST_ENG_ROS/FS
</script>
</div>
</head>
<body id="top" data-spy="scroll" data-target="#myScrollspy">
<!-- /1039154/FirstPost/Firstpost_Programmatic/Firstpost_Programmatic_2x2 -->
<div id='div-gpt-ad-1556871797346-0' style='height:2px; width:2px;'>
<script>
googletag.cmd.push(function() { googletag.display('div-gpt-ad-1556871797346-0'); });
</script>
</div>
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-MLJQLND
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->

<script type="text/javascript">
$("#searchDropDown").on('click',function(){
setTimeout(function() {
$("#searchDropDownInput").focus();
}, 100);

});

$(document).ready(function(){
var hashUrl = $(".galleryImg").attr("data-url");
var hashTitle = $(".galleryImg").attr("data-desc");
//console.log("hash urlll===== "+hashUrl);
//console.log("hash title ==== "+hashTitle);

dataLayer.push({
'event':'VirtualPageview',
'virtualPageURL':hashUrl.replace("https://www.firstpost.com", ""),
'virtualPageTitle':hashTitle
});
});

var gURL = '';


var currentHash = $("#pageURL").val();
var isbackScoll = false;
var previousScroll = 0;
var scrollTop = '';

function changeUrl(t,u,pid,desc){
gURL = '';

if(pid == 1){
u = $("#pageURL").val();
t = $("#pageTitle").val();
desc = $("#pageDesc").val();
}
gURL = u.replace("https://www.firstpost.com","");
ga('set', 'page', u);
ga('send', 'pageview');
ga('send', 'event', 'Pageview', 'photoScroll', gURL);
// callComScore();

//u = u.replace("https://www.firstpost.com","http://fpssl.prod");
$("#cUrl").val(u);
History.pushState(null,t+' Firstpost Photos '+pid,u);
$('meta[name=description]').attr('content', desc+",Firstpost Photo "+pid);

//call comscore only for forward scroll


//console.log("pid ============= "+u);
if (scrollTop < previousScroll) {
//console.log("isbackScoll trueeee");
isbackScoll = true;
}else{
//console.log("isbackScoll false");
isbackScoll = false;
}
previousScroll = scrollTop;

var countPage = 1;
if(countPage <= pid){
if(isbackScoll == false){
//console.log("inisdeeeeee ifffffff");
dataLayer.push({
'event':'VirtualPageview',
'virtualPageURL':u.replace("https://www.firstpost.com", ""),
'virtualPageTitle':t
});

}
countPage++;
}

};
$(window).scroll(function () {
scrollTop = $(window).scrollTop();
if($('.galleryImg').length > 0){
$('.galleryImg').each(function () {
var hash = $(this).attr('data-url');
if (isScrolledIntoView(this) === true && currentHash != hash) {
currentHash = hash;
changeUrl($(this).attr('alt'),$(this).data('url'),$(this).data('photo-id'),$(this).data('desc'));
}
});
}
});
function isScrolledIntoView(elem) {
var docViewTop = $(window).scrollTop();
var docViewBottom = docViewTop + $(window).height();

var elemTop = $(elem).offset().top;


var elemBottom = elemTop + $(elem).height();

return ((elemBottom <= docViewBottom) && (elemTop >= docViewTop));


}

$(document).ready(function(){
var d = new Date();
var n = d.getTime();
if(n >= 1562869801000 && n <= 1562956199000) {
setTimeout(function(){
$('.flipper').toggleClass('flip-me');
}, 10000);
$('.flipper').toggleClass('flip-me');

setInterval(function(){
// toggle the class every five second
$('.flipper').toggleClass('flip-me');
setTimeout(function(){
// toggle back after 3 second

You might also like