PageSourceSearch

https://mehmetkahya0.github.io/temp-mail/js/config.js

js mehmetkahya0.github.io collected 2026-10-03 09:35:47 UTC 2,109 bytes, 67 lines download raw bytes

1// ─────────────────────────────────────────────
2// TempMail v3 — Configuration
3// Author: Mehmet Kahya
4// Last Updated: 9 February 2026
5// ─────────────────────────────────────────────
6
7// Duplicate domain/license guard (defense-in-depth)
8(() => {
9    const params = new URLSearchParams(location.search);
10    if (params.get('dev') === '1') {
11        sessionStorage.setItem('TEMP_MAIL_DEV_OVERRIDE', '1');
12    }
13    const devOverride = sessionStorage.getItem('TEMP_MAIL_DEV_OVERRIDE') === '1';
14    const ALLOWED_HOST = ['mehmetkahya0.github.io', '127.0.0.1'];
15    if (!devOverride && !ALLOWED_HOST.includes(location.host) && !ALLOWED_HOST.includes(location.hostname)) {
16        throw new Error('UNAUTHORIZED_HOST');
17    }
18})();
19
20const CONFIG = {
21    API_BASE: 'https://api.guerrillamail.com/ajax.php',
22
23    // Storage keys
24    EMAIL_KEY: 'temp_mail_address',
25    SESSION_KEY: 'guerrilla_session_id',
26    AUTO_REFRESH_KEY: 'temp_mail_auto_refresh',
27    REFRESH_INTERVAL_KEY: 'temp_mail_refresh_interval',
28    SESSION_START_KEY: 'temp_mail_session_start',
29    EMAIL_CACHE_KEY: 'temp_mail_email_cache',
30    KNOWN_IDS_KEY: 'temp_mail_known_ids',
31
32    // Retry & timeout
33    MAX_RETRIES: 3,
34    RETRY_DELAY: 2000,
35    REQUEST_TIMEOUT: 12000,
36
37    // Available domains
38    DOMAINS: [
39        'guerrillamail.com',
40        'guerrillamail.net',
41        'guerrillamail.org',
42        'guerrillamailblock.com',
43        'grr.la',
44        'pokemail.net',
45        'spam4.me'
46    ],
47
48    // System status
49    STATUS: {
50        ONLINE: { text: 'Online', class: 'online' },
51        OFFLINE: { text: 'Offline', class: 'offline' },
52        LOADING: { text: 'Syncing', class: 'loading' }
53    },
54
55    // Toast durations (ms)
56    TOAST_DURATION: 3500,
57    TOAST_DURATION_LONG: 6000,
58
59    // Search debounce (ms)
60    SEARCH_DEBOUNCE: 250,
61};
62
63Object.freeze(CONFIG);
64Object.freeze(CONFIG.STATUS);
65Object.freeze(CONFIG.DOMAINS);
66
67export default CONFIG;

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.