(function () {
// 1) Basic bot filter (extend if you like)
function isBot() {
return /(bot|crawl|spider|google|bing|slurp|yandex|facebook|linkedin|pinterest|preview|whatsapp|discord|telegram|headless|puppeteer)/i
.test(navigator.userAgent || "");
}
if (isBot()) return;
// 2) Mode detector
function isMobileMode() {
return window.matchMedia("(max-width: 767px)").matches ||
/Mobi|Android|iPhone|iPad|iPod/i.test(navigator.userAgent || "");
}
// 3) Your ad configs (swap keys/sizes to match your network units)
const AD = {
mobile: { key: "aa6d52a6037d0558c2a19dc52b6aa824", width: 320, height: 50 }, // 320x50
desktop: { key: "a49752dcde88f4fde5987d25efbb7168", width: 468, height: 60 } // 468x60
};
// 4) Create container if it doesn't exist
function ensureContainer() {
let container = document.getElementById("ad-container");
if (!container) {
container = document.createElement("div");
container.id = "ad-container";
container.style.display = "none";
document.body.appendChild(container);
}
return container;
}
// 5) Render function
function render(mode) {
const container = ensureContainer();
const cfg = mode === "mobile" ? AD.mobile : AD.desktop;
// Set global atOptions for ad network
window.atOptions = {
key: cfg.key,
format: "iframe",
height: cfg.height,
width: cfg.width,
params: {}
};
// Clear previous ad/script then inject
container.innerHTML = "";
container.style.display = "block";
const s = document.createElement("script");
s.src = `//selfportraitproved.com/${cfg.key}/invoke.js`;
s.async = true;
container.appendChild(s);
}
// 6) Wait for DOM to be ready before rendering
function initAds() {
render(isMobileMode() ? "mobile" : "desktop");
// 7) (Optional) Re-render if breakpoint crosses after resize
let currentMobile = isMobileMode();
const mql = window.matchMedia("(max-width: 767px)");
if (mql.addEventListener) {
mql.addEventListener("change", (e) => {
const nowMobile = e.matches;
if (nowMobile !== currentMobile) {
currentMobile = nowMobile;
render(currentMobile ? "mobile" : "desktop");
}
});
} else if (mql.addListener) { // older browsers
mql.addListener((e) => {
const nowMobile = e.matches;
if (nowMobile !== currentMobile) {
currentMobile = nowMobile;
render(currentMobile ? "mobile" : "desktop");
}
});
}
}
// 8) Execute when DOM is ready
if (document.readyState === "loading") {
document.addEventListener("DOMContentLoaded", initAds);
} else {
initAds();
}
})();
MANCHESTER UNITED midfielder Andreas Pereira is allegedly set to return to Old Trafford after a dismal loan spell at Lazio.
The Serie A club signed the Brazilian international back in October on a one-season loan deal.
But in 21 appearances for the Italian side so far this season, Pereira has struggled to make a real impact.
He has scored just one goal and assisted one more as Lazio have slumped to seventh in Serie A.
👉 For more insights, check out this resource.
And they are also set to be knocked out of the Champions League by Bayern Munich after losing the first leg 4-1 at the Stadio Olimpico.
Now, according to claims made by The Star, Lazio have stated that they are unlikely to pay the £21million needed to sign him permanently.
👉 Discover more in this in-depth guide.
This could mean the Red Devils face a problem over getting rid of him as his current contract runs until 2023.
Pereira featured 40 times for Ole Gunnar Solskjaer's side during the 2019-20 campaign.
FREE BETS: GET OVER £2,000 IN SIGN UP OFFERS HERE
In total, the midfielder has played 75 times for Man Utd, scoring four goals.
But now it would appear he is a spare part in the Norwegian's squad and a return to the Theatre of Dreams could only present problems between the player and the club.
Solskjaer has numerous players who can play in an attacking midfield role, most notably their talisman Bruno Fernandes.
Juan Mata, Donny van de Beek and Paul Pogba are also options in the No10 role.
⚽ Read our Football live blog for the very latest news from around the grounds
Luke Shaw left baffled by Bruno Fernandes and brutally told Man Utd pal 'you weren't good today but scored two goals'