(function () {
let commentURL = "https://comment.ifragasatt.se/comment?customerId=27&articleId=244192&alias=true&articleUrl=https://www.senioren.se/nyheter/en-av-fyra-svarar-aldrig-pa-okant-nummer/&commentsToShow=5&articleDescription=En+av+fyra+svarar+aldrig+n%C3%A4r+ett+ok%C3%A4nt+nummer+ringer.+Det+visar+en+ny+unders%C3%B6kning+fr%C3%A5n+Kantar+Sifo.+De+som+%C3%A4r+minst+ben%C3%A4gna+att+svara+%C3%A4r+%C3%A4ldre.&articleImage=https://www.senioren.se/wp-content/uploads/2022/04/aldrebedragerier-600x308.jpg&articlePublishedTime=2022-09-02 13:15:36&stickylogin=false&languageName=svenska&languageShortName=sv";
let allowSticky = commentURL.includes("stickylogin=true");
if (allowSticky) {
let cookie = document.cookie
.split('; ')
.find(row => row.startsWith('ifragasatt_cookie='));
if (cookie) {
let cookieValue = cookie.split('=')[1];
commentURL += "&cookie=" + cookieValue;
}
}
function getDomain(url) {
url = url.replace(/(https?:\/\/)?(www.)?/i, '');
if (url.indexOf('/') !== -1) {
url = url.split('/')[0];
}
return "." + url;
}
let ifrURL = "";
document.getElementById("ifragasatt-244192").innerHTML = ifrURL;
window.addEventListener('message', receiveMessage, false);
function receiveMessage(evt) {
const commentDiv = document.getElementById("ifragasatt-244192");
let domain = window.location.hostname.replace(/(https?:\/\/)?(www.)?/i, '');
if (domain.indexOf('/') !== -1) {
domain = domain.split('/')[0];
}
if (evt.data.id === "ifragasatt-244192" && commentDiv && commentDiv.firstChild) {
document.getElementById("ifragasatt-244192").firstChild.style.height = evt.data.height;
}
if (allowSticky && (evt.data.id === "ifr-set-cookie")) {
const token = evt.data.token;
if (token && token.length > 0) {
const maxAge = 30 * 24 * 60 * 60;
const cookie = "ifragasatt_cookie=" + token + "; max-age=" + maxAge + ";domain=." + domain + ";";
document.cookie = cookie;
}
}
if (evt.data.id === "ifr-remove-cookie") {
const cookie = "ifragasatt_cookie=;expires=Thu, 01 Jan 1970 00:00:01 GMT;max-age=-1;domain=." + domain + ";";
document.cookie = cookie;
commentURL = "https://comment.ifragasatt.se/comment?customerId=27&articleId=244192&alias=true&articleUrl=https://www.senioren.se/nyheter/en-av-fyra-svarar-aldrig-pa-okant-nummer/&commentsToShow=5&articleDescription=En+av+fyra+svarar+aldrig+n%C3%A4r+ett+ok%C3%A4nt+nummer+ringer.+Det+visar+en+ny+unders%C3%B6kning+fr%C3%A5n+Kantar+Sifo.+De+som+%C3%A4r+minst+ben%C3%A4gna+att+svara+%C3%A4r+%C3%A4ldre.&articleImage=https://www.senioren.se/wp-content/uploads/2022/04/aldrebedragerier-600x308.jpg&articlePublishedTime=2022-09-02 13:15:36&stickylogin=false&languageName=svenska&languageShortName=sv";
ifrURL = "";
document.getElementById("ifragasatt-244192").innerHTML = ifrURL;
}
}
})();