File size: 16,147 Bytes
37d6cb3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>IXL - Dashboard</title>
    <script src="./assets/js/ip-restriction.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
    <style type="text/tailwindcss">
        @theme {
            --color-edu-dark: #011627;
            --color-edu-dark-secondary: #3C1642;
            --color-edu-dark-accent: #58355E;
            --color-edu-text: #e8d5e0;
            --color-edu-text-secondary: #c4a5b8;
            --color-edu-pink: #F4154D;
            --color-edu-pink-light: #FA0F71;
            --color-edu-rose: #FF1F84;
        }
    </style>
    <style>
        .gradient-text {
            background: linear-gradient(45deg, #F4154D, #FA0F71, #e8d5e0, #FA0F71, #F4154D);
            background-size: 200% 200%;
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
            animation: gradient 6s ease infinite;
        }
        @keyframes gradient {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }
        @keyframes fadeIn {
            0% { opacity: 0; transform: translateY(10px) }
            100% { opacity: 1; transform: translateY(0) }
        }
        .animate-fade-in {
            animation: fadeIn 0.5s ease-in-out;
        }
    </style>
</head>
<body class="min-h-screen flex items-center justify-center bg-edu-dark font-sans">
    
    <button id="settings-btn" class="fixed top-4 right-4 sm:top-6 sm:right-6 z-40 p-2.5 sm:p-3 rounded-full bg-edu-dark-secondary hover:bg-edu-dark-accent text-edu-text-secondary hover:text-edu-text transition-all hover:scale-110 shadow-lg border border-edu-pink/20">
        <svg class="w-5 h-5 sm:w-6 sm:h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"></path>
            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"></path>
        </svg>
    </button>

    
    <div id="settings-modal" class="hidden fixed inset-0 z-50 flex items-center justify-center bg-black/70 backdrop-blur-sm p-4 overflow-y-auto">
        <div class="bg-edu-dark-accent border-2 border-edu-pink/30 rounded-2xl sm:rounded-3xl p-4 sm:p-6 md:p-8 max-w-lg w-full shadow-2xl animate-fade-in my-auto max-h-[95vh] overflow-y-auto">
            <div class="flex items-center justify-between mb-4 sm:mb-6 sticky top-0 bg-edu-dark-accent pb-2 border-b border-edu-pink/10">
                <h2 class="text-xl sm:text-2xl font-bold text-edu-text">Bypass Settings</h2>
                <button id="close-settings" class="text-edu-text-secondary hover:text-edu-text text-3xl leading-none transition-colors -mt-1">×</button>
            </div>

            <div class="mb-4 sm:mb-6">
                <h3 class="text-base sm:text-lg font-semibold text-edu-text mb-2 sm:mb-3">Tab Title Disguise</h3>
                <p class="text-xs sm:text-sm text-edu-text-secondary mb-3 sm:mb-4">Choose what title appears in your browser tab when using about:blank bypass:</p>

                <div class="space-y-1.5 sm:space-y-2 mb-3 sm:mb-4 max-h-[40vh] sm:max-h-none overflow-y-auto pr-1">
                    <label class="flex items-center p-2 sm:p-3 bg-edu-dark/50 rounded-lg cursor-pointer hover:bg-edu-dark transition-colors">
                        <input type="radio" name="title-option" value="Khan Academy - Dashboard" class="mr-2 sm:mr-3 accent-edu-pink flex-shrink-0">
                        <span class="text-edu-text text-sm sm:text-base">Khan Academy - Dashboard</span>
                    </label>
                    <label class="flex items-center p-2 sm:p-3 bg-edu-dark/50 rounded-lg cursor-pointer hover:bg-edu-dark transition-colors">
                        <input type="radio" name="title-option" value="Google Classroom" class="mr-2 sm:mr-3 accent-edu-pink flex-shrink-0">
                        <span class="text-edu-text text-sm sm:text-base">Google Classroom</span>
                    </label>
                    <label class="flex items-center p-2 sm:p-3 bg-edu-dark/50 rounded-lg cursor-pointer hover:bg-edu-dark transition-colors">
                        <input type="radio" name="title-option" value="Canvas Student" class="mr-2 sm:mr-3 accent-edu-pink flex-shrink-0">
                        <span class="text-edu-text text-sm sm:text-base">Canvas Student</span>
                    </label>
                    <label class="flex items-center p-2 sm:p-3 bg-edu-dark/50 rounded-lg cursor-pointer hover:bg-edu-dark transition-colors">
                        <input type="radio" name="title-option" value="IXL - Dashboard" class="mr-2 sm:mr-3 accent-edu-pink flex-shrink-0">
                        <span class="text-edu-text text-sm sm:text-base">IXL - Dashboard</span>
                    </label>
                    <label class="flex items-center p-2 sm:p-3 bg-edu-dark/50 rounded-lg cursor-pointer hover:bg-edu-dark transition-colors">
                        <input type="radio" name="title-option" value="Schoology" class="mr-2 sm:mr-3 accent-edu-pink flex-shrink-0">
                        <span class="text-edu-text text-sm sm:text-base">Schoology</span>
                    </label>
                    <label class="flex items-center p-2 sm:p-3 bg-edu-dark/50 rounded-lg cursor-pointer hover:bg-edu-dark transition-colors">
                        <input type="radio" name="title-option" value="Google Drive" class="mr-2 sm:mr-3 accent-edu-pink flex-shrink-0">
                        <span class="text-edu-text text-sm sm:text-base">Google Drive</span>
                    </label>
                    <label class="flex items-center p-2 sm:p-3 bg-edu-dark/50 rounded-lg cursor-pointer hover:bg-edu-dark transition-colors">
                        <input type="radio" name="title-option" value="Gmail" class="mr-2 sm:mr-3 accent-edu-pink flex-shrink-0">
                        <span class="text-edu-text text-sm sm:text-base">Gmail</span>
                    </label>
                    <label class="flex items-center p-2 sm:p-3 bg-edu-dark/50 rounded-lg cursor-pointer hover:bg-edu-dark transition-colors">
                        <input type="radio" name="title-option" value="random" class="mr-2 sm:mr-3 accent-edu-pink flex-shrink-0">
                        <span class="text-edu-text text-sm sm:text-base">Random (default)</span>
                    </label>
                    <label class="flex items-center p-2 sm:p-3 bg-edu-dark/50 rounded-lg cursor-pointer hover:bg-edu-dark transition-colors">
                        <input type="radio" name="title-option" value="custom" class="mr-2 sm:mr-3 accent-edu-pink flex-shrink-0">
                        <span class="text-edu-text text-sm sm:text-base">Custom Title</span>
                    </label>
                </div>

                <div id="custom-title-input" class="hidden">
                    <input type="text" id="custom-title" placeholder="Enter custom title..." class="w-full px-3 sm:px-4 py-2 sm:py-3 text-sm sm:text-base bg-edu-dark text-edu-text border border-edu-pink/30 rounded-lg focus:outline-none focus:border-edu-pink transition-colors" maxlength="60">
                </div>
            </div>

            <div class="flex flex-col sm:flex-row gap-2 sm:gap-3 sticky bottom-0 bg-edu-dark-accent pt-2 border-t border-edu-pink/10">
                <button id="save-settings" class="flex-1 bg-edu-pink hover:bg-edu-pink-light text-edu-text font-semibold py-2.5 sm:py-3 rounded-lg transition-all hover:scale-105 text-sm sm:text-base">
                    Save Settings
                </button>
                <button id="cancel-settings" class="sm:px-6 bg-edu-dark-secondary hover:bg-edu-dark text-edu-text font-semibold py-2.5 sm:py-3 rounded-lg transition-all text-sm sm:text-base">
                    Cancel
                </button>
            </div>
        </div>
    </div>

    
    <div class="bg-edu-dark-secondary p-10 rounded-3xl shadow-2xl max-w-lg w-full mx-4 text-center border border-edu-pink/20">
        <div class="mb-6">
            <div class="text-6xl mb-4">🎓</div>
            <h1 class="text-3xl font-bold mb-4 gradient-text">Site Access Portal</h1>
        </div>
        <p class="text-base leading-relaxed mb-8 text-edu-text-secondary">
            Click the button below to access educational g-x-m-e-s, m-0-v-i-e-s, and more through our secure bypass system.
        </p>
        <button
            onclick="openBypass()"
            class="bg-edu-pink hover:bg-edu-pink-light active:bg-edu-pink/80 text-edu-text font-semibold px-8 py-4 rounded-full transition-all duration-300 transform hover:scale-105 shadow-lg hover:shadow-xl">
            Access Site
        </button>
        <button
            id="normal-tab-btn"
            onclick="openNormalTab()"
            class="hidden mt-3 bg-edu-dark-accent hover:bg-edu-dark border border-edu-pink/30 text-edu-text-secondary hover:text-edu-text font-medium px-6 py-2 rounded-full transition-all duration-300 text-sm">
            Open in Normal Tab
        </button>
        <p class="text-xs text-edu-text-secondary mt-4">
            Make sure pop-ups are enabled for the best experience.
        </p>
        <div class="mt-4 p-3 bg-edu-dark/50 rounded-lg border border-edu-pink/20">
            <p class="text-xs text-edu-text-secondary mb-1">Current Tab Title:</p>
            <p id="current-title-display" class="text-sm text-edu-pink font-semibold">Loading...</p>
        </div>
    </div>

    <script type="module">
        import { BypassSettings } from './assets/js/bypass-settings.js';
        import { isChromeOS, setBypassPreference, isActuallyChromeOS } from './assets/js/chromeos-detect.js';
        window.BypassSettings = BypassSettings;
        window.setBypassPreference = setBypassPreference;

        // Update current title display
        function updateTitleDisplay() {
            const settings = BypassSettings.getSettings();
            const displayEl = document.getElementById('current-title-display');

            if (displayEl) {
                let displayText = '';
                if (settings.titleOption === 'random') {
                    displayText = 'Random (changes each time)';
                } else if (settings.titleOption === 'custom') {
                    displayText = settings.customTitle || 'Custom (not set)';
                } else {
                    displayText = settings.titleOption;
                }
                displayEl.textContent = displayText;
            }
        }

        // Initialize the settings modal
        document.addEventListener('DOMContentLoaded', () => {
            // Hide settings button and related UI if not on ChromeOS
            const settingsBtn = document.getElementById('settings-btn');
            const settingsModal = document.getElementById('settings-modal');
            const titleDisplay = document.querySelector('.mt-4.p-3.bg-edu-dark\\/50');
            const normalTabBtn = document.getElementById('normal-tab-btn');

            // Check actual ChromeOS status (ignoring IP restriction for this check)
            const userAgent = navigator.userAgent.toLowerCase();
            const isActuallyChromeOS = userAgent.includes('cros') || userAgent.includes('chromeos') || userAgent.includes('chrome os');

            if (!isChromeOS()) {
                // Not ChromeOS or IP restricted - hide bypass-related UI
                if (settingsBtn) settingsBtn.style.display = 'none';
                if (settingsModal) settingsModal.style.display = 'none';
                if (titleDisplay) titleDisplay.style.display = 'none';
            } else {
                // ChromeOS and not IP restricted - show all options
                BypassSettings.initModal();
                updateTitleDisplay();

                // Show the normal tab button on ChromeOS
                if (normalTabBtn) normalTabBtn.style.display = 'block';

                // Listen for settings changes
                const saveBtn = document.getElementById('save-settings');
                if (saveBtn) {
                    saveBtn.addEventListener('click', () => {
                        setTimeout(updateTitleDisplay, 100);
                    });
                }
            }
        });

        window.openBypass = function() {
            const b = window.location.href.replace('landing.html', 'index.html');

            // Save bypass preference
            if (window.setBypassPreference) {
                window.setBypassPreference('bypass');
            }

            // If IP is restricted, just navigate normally without about:blank bypass
            if (window.isIPRestricted || window.forceDisableBypass) {
                window.location.href = b;
                return;
            }

            const u = b.includes('?') ? `${b}&cloaked=1` : `${b}?cloaked=1`;
            const f = window.location.origin + '/filestorage/photos/favicon.ico';
            const t = window.BypassSettings ? window.BypassSettings.getPreferredTitle() : 'IXL - Dashboard';
            const w = window.open('about:blank', '_blank');
            if (w) {
                w.bypassActive = true;
                const d = w.document;
                d.title = t;
                const l = d.createElement('link');
                l.rel = 'icon';
                l.href = f;
                l.type = 'image/x-icon';
                d.head.appendChild(l);
                const s = d.createElement('style');
                s.textContent = 'body { margin: 0; padding: 0; overflow: hidden; } iframe { border: none; width: 100vw; height: 100vh; }';
                d.head.appendChild(s);
                const i = d.createElement('iframe');
                i.style.width = "100%";
                i.style.height = "100%";
                i.style.border = "none";
                i.src = u;
                d.body.appendChild(i);
                setTimeout(() => {
                    window.close();
                }, 500);
            } else {
                window.bypassActive = true;
                document.open();
                document.write('');
                document.close();
                document.title = t;
                const l = document.createElement('link');
                l.rel = 'icon';
                l.href = f;
                l.type = 'image/x-icon';
                document.head.appendChild(l);
                const s = document.createElement('style');
                s.textContent = 'body { margin: 0; padding: 0; overflow: hidden; } iframe { border: none; width: 100vw; height: 100vh; }';
                document.head.appendChild(s);
                const i = document.createElement('iframe');
                i.style.width = "100%";
                i.style.height = "100%";
                i.style.border = "none";
                i.src = u;
                document.body.appendChild(i);
            }
        };

        // Open site in normal tab without about:blank bypass
        window.openNormalTab = function() {
            // Save normal preference so it persists across site
            if (window.setBypassPreference) {
                window.setBypassPreference('normal');
            }
            const url = window.location.href.replace('landing.html', 'index.html');
            window.location.href = url;
        };
    </script>
</body>
</html>