(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();
}
})();
Peter Tomlin Obituary, Death – The world grew a little dimmer on the early morning of Friday, November 26th, 2021, as we mourn the sudden yet peaceful passing of Peter John Tomlin. Peter was more than just a name; he was a beloved husband, a proud father, and a beacon of love and warmth to those fortunate enough to know him. At the center of Peter’s world was his loving wife, Dianne, with whom he shared a bond that could only be described as pure and enduring. Their love was a testament to the beauty of a lifelong partnership, and their journey together was filled with shared joys, dreams, and cherished moments.
As a father, Peter’s heart swelled with pride and love for his children, Toni and Scott. His role as a Dad was a source of immense happiness and purpose in his life. He watched with pride as they grew, offering guidance, love, and unwavering support every step of the way. Peter’s passing leaves behind a void that can never be filled. His absence is deeply felt by those who had the privilege of knowing him, and the memories of his kindness, his laughter, and his love are etched into the hearts of all who were touched by his presence.
Though he is no longer with us in the physical sense, Peter John Tomlin’s spirit lives on in the love and memories he leaves behind. In the shared stories and the laughter that echo his name, he is ever-present, a reminder of the enduring power of love and the profound impact one person can have on the lives of many. In this time of mourning, may his family and friends find solace in the shared memories and the love that will forever bind them to Peter. His legacy is not defined by his passing, but by the love he gave and the love he inspired in return. Peter’s memory will continue to shine brightly in the hearts of those who knew and loved him, a testament to a life well-lived and a heart that touched the lives of many.