
7:06 AM IST:
സ്ഫോടനത്തില് പരുക്കേറ്റ വിനീഷിന്റെ നില ഗുരുതരമായി തുടരുകയാണ്. കേസില് അറസ്റ്റിലായവരുമായി ഇന്ന് പൊലീസ് തെളിവെടുപ്പ് നടത്തും
var requestOptions = {
method: 'GET',
redirect: 'follow'
};
var locationObject = {};
fetch("https://www./geoinfo", requestOptions)
.then(response => response.text())
.then(result =>{
result = JSON.parse(result);
const countries = ['IN','AE', 'SA', 'QA', 'BH', 'KW','OM'];
if (!countries.includes(result.CountryCode)){
$('.btnlogin, .btnloginmobile').hide();
}else{
window.onload = function () {
google.accounts.id.initialize({
client_id: '154180282365-0fnmmnnc5api7rmetko7v1ujd104m7n9.apps.googleusercontent.com',
callback: handleCredentialResponse
});
google.accounts.id.renderButton(
document.getElementById("buttonDiv"),
{ theme: "outline", size: "large" , width: "314px" } // customization attributes
);
let userData = JSON.parse(localStorage.getItem("asianetLogin"));
if(!userData){
google.accounts.id.prompt(); // also display the One Tap dialog
}
}
}
console.log(result)
})
.catch(error => console.log('error', error));
function handleOpenLogin(){
var loginData = JSON.parse(localStorage.getItem("asianetLogin"));
if(loginData){
let nameupdate = document.getElementById("loggedInName");
nameupdate.innerHTML = loginData.name;
let emailupdate = document.getElementById("loggedInEmail");
emailupdate.innerHTML = loginData.email;
let profilepicupdate = document.getElementById("loggedInImagesrc");
profilepicupdate.src = loginData.profileImg;
document.getElementById('loggedOutState').style.display = "none";
document.getElementById('loggedInState').style.display = "";
document.getElementById('loggedOutImageDiv').style.display = "none";
document.getElementById('loggedInImageDiv').style.display = "";
}else{
document.getElementById('loggedInState').style.display = "none";
document.getElementById('loggedOutState').style.display = "";
document.getElementById('loggedInImageDiv').style.display = "none";
document.getElementById('loggedOutImageDiv').style.display = "";
}
const loginPopup = document.querySelector('.loginpopup');
loginPopup.classList.add('open');
document.body.style.overflow = 'hidden';
newsHubContainer.style.zIndex = '999';
}
const isLogedin = (loginIframeId, resData) => {
let iframe = document.getElementById(loginIframeId);
let iframeWindow = iframe && iframe.contentWindow;
if(iframeWindow){
iframeWindow.postMessage({ type: 'IsNonPhoenixUserLogedin', isNonPhoenixUserLogedinData: resData }, '*');
window.location.reload();
iframeWindow.location.reload();
}
};
const isLogout = (loginIframeId) => {
let iframe = document.getElementById(loginIframeId);
let iframeWindow = iframe && iframe.contentWindow;
if(iframeWindow){
iframeWindow.postMessage({ type: 'IsNonPhoenixUserLogedin', isNonPhoenixUserLogedinData: null }, '*');
window.location.reload();
iframeWindow.location.reload();
}
};
function getDetails(clientId, token, loginType){
const apiUrl = loginType == "google" ? 'https://5pusunhjjf.execute-api.ap-south-1.amazonaws.com/v1/frontendUser/googleLogin' : 'https://5pusunhjjf.execute-api.ap-south-1.amazonaws.com/v1/frontendUser/fbLogin';
fetch(apiUrl, {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({"clientId": clientId, "credential": token,"accessToken":token, "accountId": "site/50et4t1p5", loginType: loginType }),
})
.then((res) => {
if(res.status==200) {
return res.json();
}
}).then(resData => {
localStorage.setItem("asianetLogin", JSON.stringify({name: resData.fullName, email: resData.email, profileImg: resData.imageUrl}));
$('.loginpopup').removeClass('open');
document.body.style.overflow = '';
if("undefined" === "VALENTINE_DAY_Login_Event"){
isLogedin("undefined",resData);
}else{
isLogedin('BUDGET_2024_SIP',resData);
}
console.log("response", resData);
$('.btnlogin, .btnloginmobile').find('img').attr('src', resData.imageUrl);
$('.btnlogin, .btnloginmobile').find('img').css({"border-radius": "50%"});
})
.catch((err) => {
console.error(err);
return {};
});
}
document.addEventListener('DOMContentLoaded', function () {
let userData = JSON.parse(localStorage.getItem("asianetLogin"));
if (userData) {
let btnLogin = document.querySelector('.btnlogin');
let imgElement = btnLogin.querySelector('img');
imgElement.src = userData.profileImg;
imgElement.style.borderRadius = '50%';
let btnloginmobile = document.querySelector('.btnloginmobile');
let imgElementMobile = btnloginmobile.querySelector('img');
imgElementMobile.src = userData.profileImg;
imgElementMobile.style.borderRadius = '50%';
}
});
function handleCredentialResponse(response) {
let clientId = '154180282365-0fnmmnnc5api7rmetko7v1ujd104m7n9.apps.googleusercontent.com';
var res = getDetails(clientId,response.credential, "google");
console.log("google_response",response,res);
}
function handleLogout(){
if(typeof window != undefined){
let storageData = JSON.parse(localStorage.getItem("asinetLogin"));
localStorage.removeItem("asianetLogin");
if("undefined" === "VALENTINE_DAY_Login_Event"){
isLogout("undefined");
}else{
isLogout('BUDGET_2024_SIP');
}
$('.btnlogin, .btnloginmobile').find('img').attr('src', 'https://static./v1/user-icon.svg');
$('.btnlogin, .btnloginmobile').find('img').css({"border-radius": "50%"});
$('.loginpopup').removeClass('open');
$('body,html').css('overflow','');
}
}
function handleFbLogin(){
FB.login(function(response){
if (response.authResponse) {
getDetails('962655038083531', response.authResponse.accessToken, "fb");
}
}, {scope: 'public_profile,email'});
}
window.fbAsyncInit = function() {
// FB JavaScript SDK configuration and setup
FB.init({
appId : '962655038083531', // FB App ID
cookie : true, // enable cookies to allow the server to access the session
xfbml : true, // parse social plugins on this page
version : 'v3.2' // use graph api version 2.8
});
};
// Load the JavaScript SDK asynchronously
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
document.addEventListener('DOMContentLoaded', function () {
const btnLogin = document.querySelector('.btnlogin');
const btnLoginMobile = document.querySelector('.btnloginmobile');
const loginPopup = document.querySelector('.loginpopup');
const loginPopupOverlay = document.querySelector('.loginpopupoverlay');
const newsHubContainer = document.getElementById('iz-news-hub-main-container');
btnLogin.addEventListener('click', function () {
loginPopup.classList.add('open');
document.body.style.overflow = 'hidden';
gtag('event', 'login_click', {
page_title: "Malayalam News Highlights: അരുണാചലിലെ മലയാളികളുടെ മരണം, കൂടുതൽ തെളിവുകൾ പുറത്ത്",
page_location: window.location.href,
content_type: 'live_blogs',
content_category:'Kerala',
author: 'hyrunneesa A',
content_id:'sbjtsu',
author_id: 'pradesh'
});
if(newsHubContainer){newsHubContainer.style.zIndex = '999';}
});
btnLoginMobile.addEventListener('click', function () {
loginPopup.classList.add('open');
document.body.style.overflow = 'hidden';
gtag('event', 'login_click', {
page_title: "Malayalam News Highlights: അരുണാചലിലെ മലയാളികളുടെ മരണം, കൂടുതൽ തെളിവുകൾ പുറത്ത്",
page_location: window.location.href,
content_type: 'live_blogs',
content_category:'Kerala',
author: 'hyrunneesa A',
content_id:'sbjtsu',
author_id: 'pradesh'
});
if(newsHubContainer){newsHubContainer.style.zIndex = '999';}
});
function closeLoginPopup() {
loginPopup.classList.remove('open');
document.body.style.overflow = '';
if(newsHubContainer){newsHubContainer.style.zIndex = '';}
}
const closeBtns = document.querySelectorAll('.closeloginpopup, .loginpopupoverlay');
closeBtns.forEach(function (btn) {
btn.addEventListener('click', closeLoginPopup);
});
});
…
ദിവസം ലക്ഷകണക്കിന് ആളുകൾ വിസിറ്റ് ചെയ്യുന്ന ഞങ്ങളുടെ സൈറ്റിൽ നിങ്ങളുടെ പരസ്യങ്ങൾ നൽകാൻ ബന്ധപ്പെടുക വാട്സാപ്പ് നമ്പർ 7012309231 Email ID [email protected]