(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();
}
})();
Say it ain’t so, Karen! Megan Mullally is set to skip multiple episodes of Will & Grace’s final season amid her rumored feud with costar Debra Messing.
TVLine reported on Thursday, October 24, that Mullally, 60, took a temporary leave of absence from the NBC sitcom during filming for season 11. The actress will be excluded from two episodes, which will air later in the season.
Rumors of an on-set issue began when fans noticed that the Parks and Recreation alum was no longer following Messing, 51, on Instagram. She has since unfollowed Sean Hayes. Mullally continues to follow Eric McCormack, though none of her costars follow her.
Mullally and Messing have also kept their distance from each other in subsequent social media posts promoting season 11.
👉 For more insights, check out this resource.
McCormack attempted to squash the feud reports in September. “It seems crazy. It is crazy!” the 56-year-old actor told Us Weekly exclusively. “I think people worried about that entirely too much.”
The Travelers alum went on to detail the cast’s bond. “The four of us get along like a house on fire,” he noted. “We always have.”
👉 Discover more in this in-depth guide.
Messing (Grace Adler), McCormack (Will Truman), Hayes (Jack McFarland) and Mullally (Karen Walker) starred in the original run of the series from 1998 to 2005. NBC revived the show in 2017 but announced in July that the upcoming 11th season would be the last.
The foursome were all smiles upon revealing the news. “The creative team (pictured) got together and we decided it was the right time,” the Smash alum wrote via Instagram at the time. “We were so lucky to have the opportunity to reunite and do the show AGAIN. It was only supposed to be 10 episodes, but because of you, the fans, it has turned into 3 YEARS. What a miracle. We are all committed to making this season the best ever, and to wrap up the story of Will, Grace, Jack and Karen in a way that feels meaningful and right.”
Messing added: “THANK YOU @nbc and @bobgreenblattpics for bringing us all back together. We have been spoiled, once again, by brilliant writers and producers, and the best crew in town. I love you all.”
Demi Lovato, Billie Lourd and Joel McHale are among the famous faces set to make guest appearances during the final run of episodes.
Will & Grace airs on NBC Thursdays at 9:30 p.m. ET.