(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 creeping or a crawling animal of any kind or size, as a serpent, caterpillar, snail, or the like. |
• | Any small creeping animal or reptile, either entirely without feet, or with very short ones, including a great variety of animals; as, an earthworm; the blindworm. |
• | Any helminth; an entozoon. |
• | Any annelid. |
• | An insect larva. |
• | Same as Vermes. |
• | An internal tormentor; something that gnaws or afflicts one's mind with remorse. |
• | A being debased and despised. |
• | Anything spiral, vermiculated, or resembling a worm |
• | The thread of a screw. |
• | A spiral instrument or screw, often like a double corkscrew, used for drawing balls from firearms. |
• | A certain muscular band in the tongue of some animals, as the dog; the lytta. See Lytta. |
• | The condensing tube of a still, often curved and wound to economize space. See Illust. of Still. |
• | A short revolving screw, the threads of which drive, or are driven by, a worm wheel by gearing into its teeth or cogs. See Illust. of Worm gearing, below. |
• | To work slowly, gradually, and secretly. |
• | To effect, remove, drive, draw, or the like, by slow and secret means; -- often followed by out. |
• | To clean by means of a worm; to draw a wad or cartridge from, as a firearm. See Worm, n. 5 (b). |
• | To cut the worm, or lytta, from under the tongue of, as a dog, for the purpose of checking a disposition to gnaw. The operation was formerly supposed to guard against canine madness. |
• | To wind rope, yarn, or other material, spirally round, between the strands of, as a cable; to wind with spun yarn, as a small rope. |