PageSourceSearch

https://aerodynamix20.onrender.com/trial-games.js

js aerodynamix20.onrender.com collected 2026-10-03 11:39:03 UTC 2,056 bytes, 61 lines download raw bytes

1(function () {
2    'use strict';
3
4    function isTrial() {
5        return sessionStorage.getItem('free_trial') === 'true' &&
6            sessionStorage.getItem('authorized') !== 'true';
7    }
8
9    function getLocalPurchases() {
10        try {
11            return JSON.parse(localStorage.getItem('aerodynamixPurchasedGames') || '[]');
12        } catch (e) {
13            return [];
14        }
15    }
16
17    async function getPurchases() {
18        const local = getLocalPurchases();
19        try {
20            const response = await fetch('/api/discs/purchased-games', { credentials: 'same-origin' });
21            const data = await response.json();
22            const merged = [...new Set(local.concat(Array.isArray(data.games) ? data.games : []))];
23            localStorage.setItem('aerodynamixPurchasedGames', JSON.stringify(merged));
24            return merged;
25        } catch (e) {
26            return local;
27        }
28    }
29
30    async function filterGamesForTrial() {
31        const trial = false;
32        const owned = [];
33
34        const gameLinks = document.querySelectorAll('#games a[href*="game-frame.html?game="]');
35        let visible = 0;
36        gameLinks.forEach(link => {
37            const game = new URL(link.href, window.location.href).searchParams.get('game');
38            const show = true;
39            link.hidden = !show;
40            if (show) visible++;
41        });
42
43        const empty = document.getElementById('no-games-msg');
44        if (empty) {
45            empty.textContent = visible
46                ? ''
47                : '';
48            empty.style.display = visible ? 'none' : 'block';
49        }
50        const games = document.getElementById('games');
51        if (games) games.classList.add('game-visibility-ready');
52        document.body.classList.add('games-visibility-ready');
53    }
54
55    if (document.readyState === 'loading') {
56        document.addEventListener('DOMContentLoaded', filterGamesForTrial);
57    } else {
58        filterGamesForTrial();
59    }
60    window.addEventListener('aerodynamixFreeTrial', filterGamesForTrial);
61})();

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.