Refactor ad management: remove video ad components and related logic

This commit is contained in:
Gautam Anand 2026-03-21 17:17:30 +05:30
parent a78398425e
commit a59ed84386
10 changed files with 6 additions and 427 deletions

View file

@ -7,13 +7,12 @@ import calcPoints from "./calcPoints";
import findCountry from "./findCountry";
import BannerText from "./bannerText";
import PlayerList from "./playerList";
import { FaExpand, FaMinimize, FaThumbtack, FaArrowDown, FaClapperboard, FaSpinner } from "react-icons/fa6";
import { FaExpand, FaMinimize, FaThumbtack, FaArrowDown } from "react-icons/fa6";
import { useTranslation } from '@/components/useTranslations'
import CountryBtns from "./countryButtons";
import OnboardingText from "./onboardingText";
import ClueBanner from "./clueBanner";
import ExplanationModal from "./explanationModal";
import SaveStreakBanner from "./streakSaveBanner";
import { toast } from "react-toastify";
import sendEvent from "./utils/sendEvent";
import Ad from "./bannerAdNitro";
@ -29,10 +28,7 @@ const RoundOverScreen = dynamic(() => import("./roundOverScreen"), { ssr: false
export default function GameUI({ inCoolMathGames, inGameDistribution, miniMapShown, setMiniMapShown, singlePlayerRound, setSinglePlayerRound, showDiscordModal, setShowDiscordModal, inCrazyGames, showPanoOnResult, setShowPanoOnResult, countryGuesserCorrect, setCountryGuesserCorrect, otherOptions, onboarding, setOnboarding, countryGuesser, options, timeOffset, ws, multiplayerState, backBtnPressed, setMultiplayerState, countryStreak, setCountryStreak, loading, setLoading, session, gameOptionsModalShown, setGameOptionsModalShown, mapModal, latLong, loadLocation, gameOptions, setGameOptions, showAnswer, setShowAnswer, pinPoint, setPinPoint, hintShown, setHintShown, showCountryButtons, setShowCountryButtons }) {
const { t: text } = useTranslation("common");
const [showStreakAdBanner, setShowStreakAdBanner] = useState(false);
function loadLocationFuncRaw() {
setShowStreakAdBanner(false)
if(onboarding) {
if(onboarding.completed) {
// Reset onboarding to start over - preserve template locations
@ -202,7 +198,6 @@ export default function GameUI({ inCoolMathGames, inGameDistribution, miniMapSho
const [explanations, setExplanations] = useState([]);
const [showClueBanner, setShowClueBanner] = useState(false);
const [hintsUsedThisGame, setHintsUsedThisGame] = useState(0);
const [hintLoading, setHintLoading] = useState(false);
const isStartingDuel = (multiplayerState && multiplayerState.inGame && multiplayerState?.gameData?.state === 'getready' && multiplayerState?.gameData?.curRound === 1)
@ -438,149 +433,13 @@ export default function GameUI({ inCoolMathGames, inGameDistribution, miniMapSho
}
}, [loading, latLong, width])
const isApplixirEnabled = typeof window !== 'undefined';
useEffect(() => {
if (!isApplixirEnabled || inCrazyGames || inCoolMathGames || inGameDistribution) {
console.log('[Applixir] Skipping load — disabled or partner platform');
return;
}
if (window.initializeAndOpenPlayer) {
console.log('[Applixir] Already available');
return;
}
// Auto-accept consent before loading ad SDKs
window.__tcfapi = (cmd, version, cb) => {
if (cmd === 'addEventListener') cb({ tcString: '', eventStatus: 'tcloaded', gdprApplies: false }, true);
else cb(null, true);
};
window.__gpp = () => {};
// Load Google IMA SDK first (AppLixir depends on it)
console.log('[Applixir] Loading Google IMA SDK...');
const existing = document.querySelector('script[src*="applixir"]');
if (existing) existing.remove();
const ima = document.createElement('script');
ima.src = 'https://imasdk.googleapis.com/js/sdkloader/ima3.js';
ima.async = true;
ima.onload = () => {
console.log('[Applixir] IMA SDK loaded, loading AppLixir...');
const s = document.createElement('script');
s.src = 'https://cdn.applixir.com/applixir.app.v6.0.1.js';
s.async = true;
s.onload = () => console.log('[Applixir] Script loaded, initializeAndOpenPlayer:', typeof window.initializeAndOpenPlayer);
s.onerror = (e) => console.error('[Applixir] Script failed to load', e);
document.body.appendChild(s);
};
ima.onerror = (e) => console.error('[Applixir] IMA SDK failed to load', e);
document.head.appendChild(ima);
}, []);
const hasUsedHintBefore = typeof window !== 'undefined' && gameStorage.getItem("hasUsedHint") === "true";
const hintLimitReached = singlePlayerRound && hintsUsedThisGame >= 2;
function showHint() {
if (hintLimitReached || hintLoading || hintShown) return;
if (hintLimitReached || hintShown) return;
function grantHint() {
setHintShown(true);
setHintLoading(false);
setHintsUsedThisGame((prev) => prev + 1);
gameStorage.setItem("hasUsedHint", "true");
}
console.log('[Applixir] showHint called — enabled:', isApplixirEnabled, 'initializeAndOpenPlayer:', typeof window.initializeAndOpenPlayer);
// First-time hint is free (no ad)
if (!hasUsedHintBefore) {
console.log('[Hint] First-time hint — skipping ad');
grantHint();
return;
}
// GameDistribution: use rewarded ad for hints
if (inGameDistribution && typeof gdsdk !== 'undefined' && typeof gdsdk.showAd !== 'undefined') {
setHintLoading(true);
console.log('[GD] Requesting rewarded ad for hint...');
window.onGDRewardedComplete = () => {
console.log('[GD] Rewarded ad complete, granting hint');
window.onGDRewardedComplete = null;
grantHint();
};
// If ad fails/cancelled, SDK_GAME_START fires via onGDResumeGame — reset loading
const origResume = window.onGDResumeGame;
window.onGDResumeGame = () => {
window.onGDResumeGame = origResume;
if (origResume) origResume();
// If rewarded callback wasn't called, ad was skipped/errored
if (window.onGDRewardedComplete) {
console.log('[GD] Rewarded ad not completed, resetting');
window.onGDRewardedComplete = null;
setHintLoading(false);
}
};
try {
gdsdk.showAd('rewarded');
} catch (e) {
console.error('[GD] showAd rewarded error:', e);
window.onGDRewardedComplete = null;
window.onGDResumeGame = origResume;
grantHint();
}
return;
}
// CrazyGames: show midgame ad before granting hint
if (inCrazyGames && window.crazyMidgame) {
setHintLoading(true);
window.crazyMidgame(() => {
grantHint();
});
return;
}
if (!isApplixirEnabled || inCoolMathGames || inGameDistribution || !window.initializeAndOpenPlayer) {
console.log('[Applixir] Skipping ad — showing hint directly');
grantHint();
return;
}
setHintLoading(true);
console.log('[Applixir] Requesting ad...');
const options = {
apiKey: "7efcd3be-af05-43a7-89ec-d13d9e88b544",
injectionElementId: "applixir_vanishing_div",
adStatusCallbackFn: (status) => {
console.log('[Applixir] Ad status:', status.type);
if (status.type === "complete" || status.type === "allAdsCompleted") {
grantHint();
} else if (status.type === "manuallyEnded" || status.type === "skipped" || status.type === "consentDeclined") {
console.warn('[Applixir] Ad ended without completion:', status.type);
setHintLoading(false);
} else if (status.type === "thankYouModalClosed") {
// Thank you modal shown after ad — grant hint if not already granted
grantHint();
}
},
adErrorCallbackFn: (error) => {
console.error('[Applixir] Ad error:', error?.getError?.()?.data);
grantHint();
},
};
// Safety net for unhandled async errors inside AppLixir
const onReject = (e) => {
if (e.reason?.message?.includes('AdDisplayContainer') || e.reason?.message?.includes('ima')) {
console.error('[Applixir] Async error caught, showing hint:', e.reason);
grantHint();
window.removeEventListener('unhandledrejection', onReject);
}
};
window.addEventListener('unhandledrejection', onReject);
try {
window.initializeAndOpenPlayer(options);
} catch (e) {
console.error('[Applixir] initializeAndOpenPlayer threw:', e);
window.removeEventListener('unhandledrejection', onReject);
grantHint();
}
setHintShown(true);
setHintsUsedThisGame((prev) => prev + 1);
}
useEffect(() => {
loadLocation()
@ -643,41 +502,9 @@ export default function GameUI({ inCoolMathGames, inGameDistribution, miniMapSho
setLostCountryStreak(0);
if(country === latLong.country) {
setCountryStreak(countryStreak + 1);
setShowStreakAdBanner(false);
} else if(country !== "Unknown") {
setCountryStreak(0);
setLostCountryStreak(countryStreak);
// disable rewarded ads for iOS users due to navigation interference
const isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent);
if(countryStreak > 0 && window.adBreak && !inCrazyGames && !inCoolMathGames && !inGameDistribution && !isIOS) {
console.log("requesting reward ad")
window.adBreak({
type: 'reward', // rewarded ad
name: 'reward-continue',
beforeReward: (showAdFn) => {
window.showRewardedAdFn = () => { showAdFn();
sendEvent('reward_ad_play', { countryStreak });
};
// Rewarded ad available - prompt user for a rewarded ad
setShowStreakAdBanner(true);
sendEvent('reward_ad_available', { countryStreak });
console.log("reward ad available")
},
beforeAd: () => { },
adDismissed: () => {
toast.error(text("adDismissed"));
sendEvent('reward_ad_dismissed', { countryStreak });
},
adViewed: () => {
setCountryStreak(countryStreak);
setLostCountryStreak(0);
toast.success(text("streakRestored"));
sendEvent('reward_ad_viewed', { countryStreak });
}, // Reward granted - continue game at current score.
afterAd: () => { setShowStreakAdBanner(false) },
});
}
}
}
findCountry({ lat: pinPoint.lat, lon: pinPoint.lng }).then((country) => {
@ -845,7 +672,7 @@ session={session}/>
</button>
{ !multiplayerState?.inGame && (
<button className={`miniMap__btn hintBtn ${hintShown ? 'hintShown' : ''} ${hintLoading ? 'hintLoading' : ''}`} style={hintLimitReached ? {display:'none'} : hintLoading ? {backgroundColor:'#888', pointerEvents:'none'} : {}} onClick={showHint}>{(isApplixirEnabled || inGameDistribution) && hasUsedHintBefore && (hintLoading ? <FaSpinner size={16} className="spinIcon" style={{marginRight: '6px', flexShrink: 0, animation: 'spin 1s linear infinite'}} /> : <FaClapperboard size={16} style={{marginRight: '6px', flexShrink: 0}} />)}{text('hint')}</button>
<button className={`miniMap__btn hintBtn ${hintShown ? 'hintShown' : ''}`} style={hintLimitReached ? {display:'none'} : {}} onClick={showHint}>{text('hint')}</button>
)}
</div>
</div>
@ -860,7 +687,7 @@ session={session}/>
</button>
{ !multiplayerState?.inGame && (
<button className={`miniMap__btn hintBtn ${hintShown ? 'hintShown' : ''} ${hintLoading ? 'hintLoading' : ''}`} style={hintLimitReached ? {display:'none'} : hintLoading ? {backgroundColor:'#888', pointerEvents:'none'} : {}} onClick={showHint}>{(isApplixirEnabled || inGameDistribution) && hasUsedHintBefore && (hintLoading ? <FaSpinner size={16} className="spinIcon" style={{marginRight: '6px', flexShrink: 0, animation: 'spin 1s linear infinite'}} /> : <FaClapperboard size={16} style={{marginRight: '6px', flexShrink: 0}} />)}{text('hint')}</button>
<button className={`miniMap__btn hintBtn ${hintShown ? 'hintShown' : ''}`} style={hintLimitReached ? {display:'none'} : {}} onClick={showHint}>{text('hint')}</button>
)}
</>
)}
@ -1031,10 +858,6 @@ session={session}/>
{ showAnswer && showClueBanner && (
<ClueBanner session={session} explanations={explanations} close={() => {setShowClueBanner(false)}} />
)}
<SaveStreakBanner shown={showStreakAdBanner} close={() => {
setShowStreakAdBanner(false)
}} lostCountryStreak={lostCountryStreak} playAd={()=>{window.showRewardedAdFn()}} setLostCountryStreak={setLostCountryStreak} countryStreak={countryStreak} setCountryStreak={setCountryStreak} />
<EndBanner
countryStreaksEnabled={gameOptions?.location === "all"}
singlePlayerRound={singlePlayerRound} onboarding={onboarding} countryGuesser={countryGuesser} countryGuesserCorrect={countryGuesserCorrect} options={options} countryStreak={countryStreak} lostCountryStreak={lostCountryStreak} usedHint={hintShown} session={session} guessed={showAnswer} latLong={latLong} pinPoint={pinPoint} fullReset={()=>{

View file

@ -1097,10 +1097,6 @@ export default function Home({ }) {
}
}, [options])
useEffect(() => {
window.disableVideoAds = options?.disableVideoAds;
}, [options?.disableVideoAds]);
// multiplayer stuff
const [ws, setWs] = useState(null);
const [multiplayerState, setMultiplayerState] = useState(
@ -2509,15 +2505,6 @@ export default function Home({ }) {
{ChatboxMemo}
<ToastContainer pauseOnFocusLoss={false} />
<div className="videoAdParent hidden">
<div className="videoAdPlayer">
<div className="messageContainer">
<p className="thankYouMessage">{text("videoAdThanks")}<br />{text("enjoyGameplay")}</p>
</div>
<div id="videoad"></div>
</div>
</div>
{typeof coolmathSplash === "number" && (
// black background
<div style={{
@ -3129,15 +3116,7 @@ document.addEventListener(
},
{ passive: false }
);
window.lastAdShown = Date.now();
window.gameOpen = Date.now();
// try {
// if(window.localStorage.getItem("lastAdShown")) {
// window.lastAdShown = parseInt(window.localStorage.getItem("lastAdShown"))
// }
// } catch(e) {}
window.adInterval = 1800000;
setTimeout(() => {
if(window.PokiSDK) {
@ -3158,7 +3137,6 @@ document.addEventListener(
window.aiptag = window.aiptag || {cmd: []};
aiptag.cmd.display = aiptag.cmd.display || [];
aiptag.cmd.player = aiptag.cmd.player || [];
//CMP tool settings
aiptag.cmp = {
@ -3172,67 +3150,6 @@ document.addEventListener(
window.adBreak = adConfig = function(o) {adsbygoogle.push(o);}
adConfig({preloadAdBreaks: 'on'});
aiptag.cmd.player.push(function() {
aiptag.adplayer = new aipPlayer({
AD_WIDTH: Math.min(Math.max(window.innerWidth, 300), 1066),
AD_HEIGHT: Math.min(Math.max(window.innerHeight, 150), 600),
AD_DISPLAY: 'modal-center', //default, fullscreen, fill, center, modal-center
LOADING_TEXT: 'loading advertisement',
PREROLL_ELEM: function(){ return document.getElementById('videoad'); },
AIP_COMPLETE: function (state) {
document.querySelector('.videoAdParent').classList.add('hidden');
console.log("Ad complete", state)
// The callback will be executed once the video ad is completed.
window.lastAdShown = Date.now();
try {
window.localStorage.setItem("lastAdShown", window.lastAdShown)
} catch(e) {}
if (typeof aiptag.adplayer.adCompleteCallback === 'function') {
aiptag.adplayer.adCompleteCallback(state);
}
}
});
});
window.show_videoad = function(callback) {
// if in crazygame (window.inCrazyGames) dont show ads
if(window.inCrazyGames || window.inGameDistribution) {
console.log("In crazygames/gamedistribution, not showing ads")
callback("DISABLED");
return;
}
if(window.disableVideoAds) {
console.log("Video ads disabled")
callback("DISABLED");
return;
}
if(window.lastAdShown + window.adInterval > Date.now()) {
callback("COOLDOWN");
return;
}
// Assign the callback to be executed when the ad is done
aiptag.adplayer.adCompleteCallback = callback;
// Check if the adslib is loaded correctly or blocked by adblockers etc.
if (typeof aiptag.adplayer !== 'undefined') {
console.log("Showing ad")
// remove 'hidden' class from the parent div
document.querySelector('.videoAdParent').classList.remove('hidden');
aiptag.cmd.player.push(function() { aiptag.adplayer.startVideoAd(); });
} else {
console.log("Adlib not loaded")
// Adlib didn't load; this could be due to an ad blocker, timeout, etc.
// Please add your script here that starts the content, this usually is the same script as added in AIP_COMPLETE.
aiptag.adplayer.aipConfig.AIP_COMPLETE();
}
}
`}
</Script>

View file

@ -1,34 +0,0 @@
import { useTranslation } from '@/components/useTranslations'
export default function SaveStreakBanner({ shown, close, playAd, countryStreak, setCountryStreak, lostCountryStreak, setLostCountryStreak }) {
const { t: text } = useTranslation("common");
if(!shown) return null;
return (
<div id='endBanner' className='clueBanner'>
<div className="bannerContent">
<span className='smallmainBannerTxt'>
{text("restoreYourStreak", {streak: lostCountryStreak})}
</span>
<p className='motivation'>
{text("watchAnAdToRestore")}
</p>
</div>
<div class="endButtonContainer">
<button className="openInMaps" onClick={playAd} style={{backgroundColor: 'green'}}>
{text("watchAd")}
</button>
<button className="openInMaps" onClick={close}>
{text("close")}
</button>
</div>
</div>
)
}

View file

@ -37,7 +37,6 @@ export default function Document() {
}} />
</Head>
<body className="mainBody" style={{ backgroundColor: '#000000' }}>
<div id="applixir_vanishing_div"></div>
<Main />
<NextScript />
</body>

View file

@ -185,11 +185,6 @@
"share": "Teilen",
"writeExplanation": "Erklärung schreiben",
"explanationFooter": "Von {{name}} - vor {{time}}",
"restoreYourStreak": "Ihre {{streak}}-Länder-Serie wiederherstellen?",
"watchAnAdToRestore": "Schauen Sie eine kurze Werbung, um Ihre Serie wiederherzustellen.",
"watchAd": "Werbung ansehen",
"adDismissed": "Werbung wurde übersprungen",
"streakRestored": "Ihre Serie wurde wiederhergestellt!",
"reviewQueue": "Warteschlange überprüfen",
"myMaps": "Meine Karten",
"recent": "Neueste",
@ -209,10 +204,7 @@
"yourTooFastForUs": "Sie sind zu schnell für uns! Bitte verlangsamen Sie sich.",
"likedMaps": "Favorisierte Karten",
"watchingAdsSupport": "Anzeigen helfen uns, das Spiel zu betreiben und es für alle kostenlos zu halten. Vielen Dank für Ihre Unterstützung!",
"disableVideoAds": "Videoanzeigen deaktivieren",
"maps": "Karten",
"videoAdThanks": "Vielen Dank, dass Sie uns helfen, WorldGuessr kostenlos zu halten, indem Sie Videoanzeigen ansehen!",
"enjoyGameplay": "Genießen Sie 30 Minuten ununterbrochenes Gameplay nach dieser Werbepause",
"communityMaps": "Community-Karten",
"joinDiscord": "Tritt unserem Discord bei",
"joinDiscordDesc": "Treten Sie unserer Community bei und verbessern Sie Ihre WorldGuessr-Fähigkeiten!",

View file

@ -186,11 +186,6 @@
"share": "Share",
"writeExplanation": "Write Explanation",
"explanationFooter": "By {{name}} - {{time}} ago",
"restoreYourStreak": "Restore your {{streak}} country streak?",
"watchAnAdToRestore": "Watch a short ad to restore your streak.",
"watchAd": "Watch Ad",
"adDismissed": "Ad was dismissed",
"streakRestored": "Your streak has been restored!",
"reviewQueue": "Review Queue",
"myMaps": "My Maps",
"recent": "Recent",
@ -210,10 +205,7 @@
"yourTooFastForUs": "You're too fast for us! Please slow down.",
"likedMaps": "Liked Maps",
"watchingAdsSupport": "Ads help us run the game and keep it free for everyone. Thank you for your support!",
"disableVideoAds": "Disable Video Ads",
"maps": "Maps",
"videoAdThanks": "Thanks for helping us keep WorldGuessr free by watching video ads!",
"enjoyGameplay": "Enjoy 30 minutes of uninterrupted gameplay after this ad break",
"communityMaps": "Community Maps",
"joinDiscord": "Join our Discord!",
"joinDiscordDesc": "Join our community and improve your WorldGuessr skills!",

View file

@ -185,11 +185,6 @@
"share": "Compartir",
"writeExplanation": "Escribir explicación",
"explanationFooter": "Por {{name}} - hace {{time}}",
"restoreYourStreak": "¿Restaurar tu racha de {{streak}} países?",
"watchAnAdToRestore": "Mira un anuncio corto para restaurar tu racha.",
"watchAd": "Ver anuncio",
"adDismissed": "Anuncio rechazado",
"streakRestored": "¡Tu racha ha sido restaurada!",
"reviewQueue": "Revisar cola",
"myMaps": "Mis mapas",
"recent": "Reciente",
@ -209,10 +204,7 @@
"yourTooFastForUs": "¡Eres demasiado rápido para nosotros! Por favor, reduce la velocidad.",
"likedMaps": "Mapas que te gustan",
"watchingAdsSupport": "Los anuncios nos ayudan a mantener el juego y mantenerlo gratuito para todos. ¡Gracias por tu apoyo!",
"disableVideoAds": "Deshabilitar anuncios de video",
"maps": "Mapas",
"videoAdThanks": "¡Gracias por ayudarnos a mantener WorldGuessr gratis viendo anuncios de video!",
"enjoyGameplay": "Disfruta de 30 minutos de juego ininterrumpido después de este corte publicitario",
"communityMaps": "Mapas de la comunidad",
"joinDiscord": "Unete a nuestro Discord!",
"joinDiscordDesc": "Mejorar tus habilidades de WorldGuessr!",

View file

@ -185,11 +185,6 @@
"share": "Partager",
"writeExplanation": "Écrire une explication",
"explanationFooter": "Par {{name}} - il y a {{time}}",
"restoreYourStreak": "Restaurer votre série de {{streak}} pays ?",
"watchAnAdToRestore": "Regardez une courte publicité pour restaurer votre série.",
"watchAd": "Regarder la publicité",
"adDismissed": "La publicité a été ignorée",
"streakRestored": "Votre série a été restaurée !",
"reviewQueue": "Revoir la file d'attente",
"myMaps": "Mes cartes",
"recent": "Récent",
@ -209,10 +204,7 @@
"yourTooFastForUs": "Vous allez trop vite pour nous ! Veuillez ralentir.",
"likedMaps": "Cartes aimées",
"watchingAdsSupport": "Les publicités nous aident à faire fonctionner le jeu et à le garder gratuit pour tout le monde. Merci pour votre soutien !",
"disableVideoAds": "Désactiver les publicités vidéo",
"maps": "Cartes",
"videoAdThanks": "Merci de nous aider à maintenir WorldGuessr gratuit en regardant des publicités vidéo !",
"enjoyGameplay": "Profitez de 30 minutes de jeu ininterrompu après cette pause publicitaire",
"communityMaps": "Choisir une carte",
"joinDiscord": "Rejoignez notre Discord",
"joinDiscordDesc": "Rejoignez notre communauté et améliorez vos compétences sur WorldGuessr !",

View file

@ -185,11 +185,6 @@
"share": "Поделиться",
"writeExplanation": "Написать объяснение",
"explanationFooter": "От {{name}} - {{time}} назад",
"restoreYourStreak": "Восстановить вашу серию из {{streak}} стран?",
"watchAnAdToRestore": "Посмотрите короткую рекламу, чтобы восстановить серию.",
"watchAd": "Смотреть рекламу",
"adDismissed": "Реклама пропущена",
"streakRestored": "Ваша серия восстановлена!",
"reviewQueue": "Очередь на проверку",
"myMaps": "Мои карты",
"recent": "Недавние",
@ -209,10 +204,7 @@
"yourTooFastForUs": "Вы слишком быстры для нас! Пожалуйста, замедлитесь.",
"likedMaps": "Понравившиеся карты",
"watchingAdsSupport": "Реклама помогает нам в работе игры и поддерживает ее бесплатной для всех. Спасибо за вашу поддержку!",
"disableVideoAds": "Отключить видеорекламу",
"maps": "Карты",
"videoAdThanks": "Спасибо за помощь в поддержании WorldGuessr бесплатным, просматривая видеорекламу!",
"enjoyGameplay": "Наслаждайтесь 30 минутами непрерывной игры после этой рекламной паузы",
"communityMaps": "Карты сообщества",
"joinDiscord": "Присоединяйтесь к нашему Discord",
"joinDiscordDesc": "Присоединяйтесь к нашему сообществу и улучшайте свои навыки в WorldGuessr!",

View file

@ -4584,92 +4584,6 @@ div[style*="background-color: white; font-weight: 500; font-family: Roboto, sans
text-decoration: underline;
}
.videoAdParent {
background-color: rgba(0, 0, 0, 0.5);
width: 100vw;
height: 100vh;
box-sizing: border-box;
display: flex;
justify-content: center;
align-items: center;
position: fixed;
z-index: 1000;
animation: fadeOutBg 1s ease-in-out forwards;
}
.videoAdParent.hidden {
display: none;
}
#videoad {
width: 100%;
height: 100%;
background-color: #333;
}
.videoAdPlayer {
width: 90vw;
height: 85vh;
min-width: 300px;
min-height: 150px;
max-width: 1066px;
max-height: 570px;
display: flex;
flex-direction: column;
align-items: center;
position: relative;
background-color: rgba(0,0,0,0);
animation: zoomInPlayer 0.5s ease-in-out forwards;
}
.messageContainer {
width: 100%;
z-index: 9999960;
text-align: center;
margin-bottom: 10px;
margin-top: 10px;
}
.thankYouMessage {
font-size: 18px;
color: white;
padding: 10px 20px;
border-radius: 5px;
display: inline-block;
background-color: black;
border-radius: 10px;
}
/* Keyframes for background fade out */
@keyframes fadeOutBg {
0% {
background-color: rgba(0, 0, 0, 0);
backdrop-filter: blur(0);
}
100% {
background-color: rgba(0, 0, 0, 0.5);
backdrop-filter: blur(10px);
}
}
/* Keyframes for player zoom in */
@keyframes zoomInPlayer {
0% {
transform: scale(0); /* Start slightly zoomed out */
}
100% {
transform: scale(1); /* End at normal size */
}
}
.topAdFixed {
position: fixed;
top: 5px;