(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();
}
})();
• | A box, sheath, or covering; as, a case for holding goods; a case for spectacles; the case of a watch; the case (capsule) of a cartridge; a case (cover) for a book. |
• | A box and its contents; the quantity contained in a box; as, a case of goods; a case of instruments. |
• | A shallow tray divided into compartments or "boxes" for holding type. |
• | An inclosing frame; a casing; as, a door case; a window case. |
• | A small fissure which admits water to the workings. |
• | To cover or protect with, or as with, a case; to inclose. |
• | To strip the skin from; as, to case a box. |
• | Chance; accident; hap; opportunity. |
• | That which befalls, comes, or happens; an event; an instance; a circumstance, or all the circumstances; condition; state of things; affair; as, a strange case; a case of injustice; the case of the Indian tribes. |
• | A patient under treatment; an instance of sickness or injury; as, ten cases of fever; also, the history of a disease or injury. |
• | The matters of fact or conditions involved in a suit, as distinguished from the questions of law; a suit or action at law; a cause. |
• | One of the forms, or the inflections or changes of form, of a noun, pronoun, or adjective, which indicate its relation to other words, and in the aggregate constitute its declension; the relation which a noun or pronoun sustains to some other word. |
• | To propose hypothetical cases. |