1import { cards } from './content.js'; 2import { getCount } from './state.js'; 3 4const FLAG = 'wasteland-v2-completed'; 5 6export function checkCompletion() { 7 if (getCount() < cards.length) return; 8 if (localStorage.getItem(FLAG)) return; 9 localStorage.setItem(FLAG, '1'); 10 showCompletionOverlay(); 11} 12 13export function showCompletionOverlay() { 14 if (document.querySelector('.complete-overlay')) return; 15 16 const overlay = document.createElement('div'); 17 overlay.className = 'complete-overlay'; 18 overlay.innerHTML = ` 19 <div class="co-mark">✦</div> 20 <h2>ÐоÑма ÑобÑана Ñеликом</h2> 21 <p>ÐÑе ${cards.length} ÑмÑÑлов ÑаÑкÑÑÑÑ. Ðбломки ÑложилиÑÑ Ð² Ñелое: пÑÑÑ Ð³Ð»Ð°Ð², деÑÑÑки голоÑов, миÑÑ Ð¸ гоÑода â Ð¾Ñ ÐÑмÑкой Ð¡Ð¸Ð²Ð¸Ð»Ð»Ñ Ð´Ð¾ гÑома над Ðангом. «ÐÑими обломками Ñ Ð¿Ð¾Ð´Ð¿ÑÑ Ñвои ÑÑинÑ».</p> 22 <div class="co-actions"> 23 <a class="co-btn" href="collection.html">ÐÑкÑÑÑÑ ÐºÐ¾Ð»Ð»ÐµÐºÑиÑ</a> 24 <button class="co-btn" type="button" data-close>ÐеÑнÑÑÑÑÑ Ðº ÑÑениÑ</button> 25 </div> 26 `; 27 document.body.appendChild(overlay); 28 requestAnimationFrame(() => overlay.classList.add('active')); 29 30 overlay.querySelector('[data-close]').addEventListener('click', () => { 31 overlay.classList.remove('active'); 32 setTimeout(() => overlay.remove(), 800); 33 }); 34}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.