Remove a game (it wasn't supposed to be push) and update the verification script
This commit is contained in:
parent
cd4c462e62
commit
7ae9abb1ad
|
@ -2213,10 +2213,5 @@
|
||||||
"name": "Black Jack",
|
"name": "Black Jack",
|
||||||
"directory": "blackjack/",
|
"directory": "blackjack/",
|
||||||
"image": "icon.png"
|
"image": "icon.png"
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Speed Stars",
|
|
||||||
"directory": "speed-stars/",
|
|
||||||
"image": "icon.png"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
|
@ -1,103 +1,59 @@
|
||||||
(async()=>{
|
(async()=>{
|
||||||
const storageKey = 'wv-verified';
|
const storageKey = 'wv-verified';
|
||||||
const verifiedTime = localStorage.getItem(storageKey);
|
const last = localStorage.getItem(storageKey);
|
||||||
if(verifiedTime && Date.now() - verifiedTime < 2592000000) {
|
if(last && Date.now() - last < 2592000000) return;
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const s=document.createElement('style');s.textContent=`
|
const style = document.createElement('style');
|
||||||
:root{--overlay-bg:#000;--card-bg:rgba(0,0,0,0.85);--accent:#fff;--text-main:#fff;--text-secondary:rgba(255,255,255,0.7);--radius:12px;--transition:.3s ease;--dot-size:8px;--dot-gap:8px}
|
style.textContent = `
|
||||||
#wv-check-overlay{position:fixed;inset:0;background:var(--overlay-bg);display:flex;align-items:center;justify-content:center;font-family:system-ui,sans-serif;z-index:2147483647;opacity:1;transition:opacity .4s ease-out}
|
:root{--bg:#000;--card:rgba(0,0,0,0.85);--accent:#fff;--radius:12px;--trans:.3s}
|
||||||
#wv-check-overlay.fade-out{opacity:0}
|
#wv-overlay{position:fixed;inset:0;background:var(--bg);display:flex;align-items:center;justify-content:center;font-family:system-ui;z-index:9999;opacity:1;transition:opacity .4s}
|
||||||
#wv-check-card{background:var(--card-bg);backdrop-filter:blur(12px);border-radius:var(--radius);padding:32px 24px;width:340px;text-align:center;color:var(--text-main);transition:transform var(--transition)}
|
#wv-card{background:var(--card);backdrop-filter:blur(12px);border-radius:var(--radius);padding:32px;width:320px;text-align:center;color:var(--accent)}
|
||||||
#wv-check-card h2{margin:0 0 16px;font-size:1.6rem;display:flex;align-items:center;justify-content:center;gap:.5rem}
|
#wv-progress{width:100%;height:6px;background:#333;border-radius:var(--radius);overflow:hidden;margin:16px 0}
|
||||||
#wv-progress-bar{width:0;height:6px;background:var(--accent);transition:width var(--transition);border-radius:var(--radius)}
|
#wv-bar{width:0;height:100%;background:var(--accent);transition:width var(--trans)}
|
||||||
#wv-info{margin:12px 0 20px;font-size:.95rem;color:var(--text-secondary)}
|
#wv-info{font-size:.95rem;opacity:.8}
|
||||||
#wv-loading-dots{display:flex;justify-content:center;align-items:center;gap:var(--dot-gap);margin-top:5px}
|
#wv-complete{display:none;}
|
||||||
#wv-loading-dots .dot{width:var(--dot-size);height:var(--dot-size);background:var(--accent);border-radius:50%;opacity:.3;animation:windows-load 1s infinite ease-in-out}
|
#wv-complete.show{display:block;}
|
||||||
#wv-loading-dots .dot:nth-child(1){animation-delay:0s}#wv-loading-dots .dot:nth-child(2){animation-delay:.2s}#wv-loading-dots .dot:nth-child(3){animation-delay:.4s}#wv-loading-dots .dot:nth-child(4){animation-delay:.6s}
|
`;
|
||||||
@keyframes windows-load{0%,80%,100%{opacity:.3;transform:scale(1)}40%{opacity:1;transform:scale(1.4)}}
|
document.head.appendChild(style);
|
||||||
#wv-complete{display:none;text-align:center}#wv-complete.show{display:block;animation:fade-in .4s ease-out forwards}
|
|
||||||
#wv-complete h2{display:flex;align-items:center;justify-content:center;gap:.5rem;font-size:1.5rem;margin-bottom:8px;color:var(--accent)}
|
|
||||||
#wv-complete p{color:var(--accent);font-size:1rem;text-align:center;margin:0 auto;width:100%}@keyframes fade-in{from{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}
|
|
||||||
`;document.head.appendChild(s);
|
|
||||||
|
|
||||||
const overlay=document.createElement('div');overlay.id='wv-check-overlay';overlay.innerHTML=`
|
const overlay = document.createElement('div'); overlay.id='wv-overlay';
|
||||||
<div id="wv-check-card">
|
overlay.innerHTML = `
|
||||||
<h2><i class="fas fa-shield-alt"></i>Verifying Your Browser...</h2>
|
<div id="wv-card">
|
||||||
<div id="wv-progress"><div id="wv-progress-bar"></div></div>
|
<h2>Verifying Browser</h2>
|
||||||
<div id="wv-info">Starting tests...</div>
|
<div id="wv-progress"><div id="wv-bar"></div></div>
|
||||||
<div id="wv-loading-dots"><div class="dot"></div><div class="dot"></div><div class="dot"></div><div class="dot"></div></div>
|
<div id="wv-info"></div>
|
||||||
</div>
|
</div>
|
||||||
<div id="wv-complete">
|
<div id="wv-complete"><h2>Success!</h2><p>Continue.</p></div>
|
||||||
<h2><i class="fas fa-check-circle"></i>Success!</h2>
|
`;
|
||||||
<p>You may continue.</p>
|
|
||||||
</div>`;
|
|
||||||
document.body.appendChild(overlay);
|
document.body.appendChild(overlay);
|
||||||
|
|
||||||
const info=overlay.querySelector('#wv-info'), bar=overlay.querySelector('#wv-progress-bar');
|
const info = document.getElementById('wv-info');
|
||||||
const tests=[
|
const bar = document.getElementById('wv-bar');
|
||||||
async()=>({msg:'Browser Automation',pass:!navigator.webdriver}),
|
const tests = [
|
||||||
async()=>{
|
{msg:'Automation',pass:!navigator.webdriver},
|
||||||
const ua = navigator.userAgent.toLowerCase();
|
{msg:'Headless',pass:!/headless|phantomjs|puppeteer|selenium/i.test(navigator.userAgent)},
|
||||||
return {msg:'Headless Mode',pass:!/headless|phantomjs|puppeteer|selenium/i.test(ua)};
|
{msg:'Languages',pass:Array.isArray(navigator.languages) && navigator.languages.length>0},
|
||||||
},
|
{msg:'Plugins',pass:navigator.plugins.length>0},
|
||||||
async()=>({msg:'Language Support',pass:navigator.languages && navigator.languages.length > 0}),
|
{msg:'WebGL',pass:(()=>{try{const c=document.createElement('canvas');const g=c.getContext('webgl')||c.getContext('experimental-webgl');return!!g;}catch{return false;}})()}
|
||||||
async()=>({msg:'Browser Plugins',pass:navigator.plugins.length > 0}),
|
|
||||||
async()=>{
|
|
||||||
try {
|
|
||||||
const c=document.createElement('canvas');
|
|
||||||
const gl=c.getContext('webgl')||c.getContext('experimental-webgl');
|
|
||||||
if(!gl) return {msg:'WebGL Support',pass:false};
|
|
||||||
const debugInfo=gl.getExtension('WEBGL_debug_renderer_info');
|
|
||||||
const vendor=debugInfo ? gl.getParameter(debugInfo.UNMASKED_VENDOR_WEBGL) : '';
|
|
||||||
return {msg:'Graphics Driver',pass:!/swiftshader|lavapipe/i.test(vendor)};
|
|
||||||
} catch(e) {
|
|
||||||
return {msg:'WebGL Support',pass:false};
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async()=>({msg:'Screen Resolution',pass:screen.width >= 320 && screen.height >= 480}),
|
|
||||||
async()=>{
|
|
||||||
try {
|
|
||||||
const start = performance.now();
|
|
||||||
const buffer = new ArrayBuffer(1000000);
|
|
||||||
const view = new Uint8Array(buffer);
|
|
||||||
return {msg:'Performance Check',pass:performance.now() - start < 30};
|
|
||||||
} catch(e) {
|
|
||||||
return {msg:'Performance Check',pass:false};
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async()=>({msg:'Device Memory',pass:!navigator.deviceMemory || navigator.deviceMemory > 0.5}),
|
|
||||||
async()=>{
|
|
||||||
const mq=window.matchMedia('(pointer:fine)');
|
|
||||||
return {msg:'Input Method',pass:mq.matches};
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
|
|
||||||
const failures=[];
|
let failures = [];
|
||||||
for(let i=0;i<tests.length;i++){
|
for(let i=0;i<tests.length;i++){
|
||||||
try {
|
const t=tests[i];
|
||||||
const res=await tests[i]();
|
info.textContent = `${t.msg}...`;
|
||||||
info.textContent=`Test ${i+1}/${tests.length}: ${res.msg}`;
|
if(!t.pass) failures.push(t.msg);
|
||||||
if(!res.pass) failures.push(res.msg);
|
bar.style.width = `${((i+1)/tests.length)*100}%`;
|
||||||
bar.style.width=`${((i+1)/tests.length)*100}%`;
|
await new Promise(r=>setTimeout(r,200));
|
||||||
await new Promise(r=>setTimeout(r,300));
|
|
||||||
} catch(e) {
|
|
||||||
failures.push(`Test error`);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(failures.length===0){
|
if(failures.length===0){
|
||||||
localStorage.setItem(storageKey, Date.now());
|
localStorage.setItem(storageKey, Date.now());
|
||||||
overlay.querySelector('#wv-check-card').style.display='none';
|
document.getElementById('wv-card').style.display='none';
|
||||||
overlay.querySelector('#wv-complete').classList.add('show');
|
const done = document.getElementById('wv-complete'); done.classList.add('show');
|
||||||
setTimeout(()=>{
|
setTimeout(()=>overlay.style.opacity='0',500);
|
||||||
overlay.classList.add('fade-out');
|
setTimeout(()=>overlay.remove(),800);
|
||||||
setTimeout(()=>overlay.remove(),400);
|
|
||||||
},800);
|
|
||||||
} else {
|
} else {
|
||||||
info.innerHTML=`Verification failed:<br>${failures.map(m=>`• ${m}`).join('<br>')}`;
|
info.innerHTML = `Failed:<br>${failures.map(f=>`• ${f}`).join('<br>')}`;
|
||||||
bar.style.background='red';
|
bar.style.background='red';
|
||||||
overlay.querySelector('#wv-loading-dots').remove();
|
|
||||||
}
|
}
|
||||||
})();
|
})();
|
Loading…
Reference in New Issue
Block a user