(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();
}
})();
Jennifer Aniston‘s commitment to her craft takes the cake! Even the actress’ cast mates were impressed by her transformation for the upcoming film Cake, which stars the Friends alum as a very unglamorous woman in a chronic pain group. Us Weekly caught up with her costar Camille Guaty on Thursday, Nov. 20, at a Hollywood Foreign Press Association event for the 2015 Golden Globes, where she talked about working with Aniston on the movie.
“She’s depicting a character you’ve never seen her do before, and it’s just such an intense film, so emotionally raw,” Guaty, 36, told Us of the Horrible Bosses 2 actress, 45. “The struggle she goes through and her whole journey is amazing. I play the daughter to her caretaker and I’m basically there to change my mom’s perspective. I want my mom to get away from Jennifer because she’s just toxic.”
Asked about Aniston’s much-talked-about make-under, which required her to gain weight and go without makeup, Guaty replied, “It’s so funny, because a lot of people were like, ‘Is she pregnant?’ I’d say, ‘No,’ and they’d say, ‘But she looks so dowdy.’ I’m like, ‘This is the role that she’s playing!’ Knowing the story, it’s just a complete transformation.”
Guaty said she didn’t know how Justin Theroux‘s fiance had put on the extra pounds, but quipped, “Maybe it all happened before, maybe it happened behind closed doors. Maybe she ate a lot of cake!”
👉 Discover more in this in-depth guide.
In fact, Aniston told audience members at an American Cinematheque screening of the film on Nov. 19 that she just gave up exercising for a while. “I basically just didn’t work out for two-and-a-half months,” she explained. “I stopped working out and I stopped being as careful about my diet as I normally am. I was still healthy, but I’d allow more.”