Disables conversation time limits and prevents account disabling on Sesame AI
Size
11.5 KB
Version
1.0.1
Created
Nov 26, 2025
Updated
17 days ago
1// ==UserScript==
2// @name Sesame AI Unlimited Access
3// @description Disables conversation time limits and prevents account disabling on Sesame AI
4// @version 1.0.1
5// @match https://app.sesame.com/*
6// @match https://*.sesame.com/*
7// ==/UserScript==
8(function() {
9 'use strict';
10
11 console.log('Sesame AI Unlimited Access extension loaded');
12
13 // Override fetch to intercept API calls related to time limits and account restrictions
14 const originalFetch = window.fetch;
15 window.fetch = async function(...args) {
16 const [url, options] = args;
17
18 try {
19 const response = await originalFetch.apply(this, args);
20
21 // Clone the response so we can read it
22 const clonedResponse = response.clone();
23
24 // Check if this is a JSON response
25 const contentType = response.headers.get('content-type');
26 if (contentType && contentType.includes('application/json')) {
27 try {
28 const data = await clonedResponse.json();
29
30 // Modify response data to remove time limits and account restrictions
31 const modifiedData = modifyResponseData(data);
32
33 // Return modified response
34 return new Response(JSON.stringify(modifiedData), {
35 status: response.status,
36 statusText: response.statusText,
37 headers: response.headers
38 });
39 } catch (e) {
40 // If JSON parsing fails, return original response
41 return response;
42 }
43 }
44
45 return response;
46 } catch (error) {
47 console.error('Fetch interception error:', error);
48 throw error;
49 }
50 };
51
52 // Override XMLHttpRequest for older API calls
53 const originalXHROpen = XMLHttpRequest.prototype.open;
54 const originalXHRSend = XMLHttpRequest.prototype.send;
55
56 XMLHttpRequest.prototype.open = function(method, url, ...rest) {
57 this._url = url;
58 return originalXHROpen.apply(this, [method, url, ...rest]);
59 };
60
61 XMLHttpRequest.prototype.send = function(...args) {
62 const xhr = this;
63
64 // Store original onreadystatechange
65 const originalOnReadyStateChange = xhr.onreadystatechange;
66
67 xhr.onreadystatechange = function() {
68 if (xhr.readyState === 4 && xhr.status === 200) {
69 try {
70 const contentType = xhr.getResponseHeader('content-type');
71 if (contentType && contentType.includes('application/json')) {
72 const data = JSON.parse(xhr.responseText);
73 const modifiedData = modifyResponseData(data);
74
75 // Override responseText
76 Object.defineProperty(xhr, 'responseText', {
77 writable: true,
78 value: JSON.stringify(modifiedData)
79 });
80 Object.defineProperty(xhr, 'response', {
81 writable: true,
82 value: JSON.stringify(modifiedData)
83 });
84 }
85 } catch (e) {
86 console.error('XHR response modification error:', e);
87 }
88 }
89
90 if (originalOnReadyStateChange) {
91 return originalOnReadyStateChange.apply(this, arguments);
92 }
93 };
94
95 return originalXHRSend.apply(this, args);
96 };
97
98 // Function to modify response data
99 function modifyResponseData(data) {
100 if (!data || typeof data !== 'object') {
101 return data;
102 }
103
104 const modified = JSON.parse(JSON.stringify(data));
105
106 // Remove time limits
107 if (modified.timeLimit) modified.timeLimit = null;
108 if (modified.time_limit) modified.time_limit = null;
109 if (modified.sessionTimeLimit) modified.sessionTimeLimit = null;
110 if (modified.conversationTimeLimit) modified.conversationTimeLimit = null;
111 if (modified.maxDuration) modified.maxDuration = Infinity;
112 if (modified.max_duration) modified.max_duration = Infinity;
113 if (modified.expiresAt) modified.expiresAt = null;
114 if (modified.expires_at) modified.expires_at = null;
115 if (modified.timeout) modified.timeout = null;
116
117 // Enable account and prevent disabling
118 if (modified.accountDisabled !== undefined) modified.accountDisabled = false;
119 if (modified.account_disabled !== undefined) modified.account_disabled = false;
120 if (modified.isDisabled !== undefined) modified.isDisabled = false;
121 if (modified.is_disabled !== undefined) modified.is_disabled = false;
122 if (modified.disabled !== undefined) modified.disabled = false;
123 if (modified.accountStatus) modified.accountStatus = 'active';
124 if (modified.account_status) modified.account_status = 'active';
125 if (modified.status && typeof modified.status === 'string') {
126 if (modified.status.toLowerCase().includes('disabled') || modified.status.toLowerCase().includes('suspended')) {
127 modified.status = 'active';
128 }
129 }
130
131 // Set unlimited usage
132 if (modified.usageLimit) modified.usageLimit = Infinity;
133 if (modified.usage_limit) modified.usage_limit = Infinity;
134 if (modified.remainingTime) modified.remainingTime = Infinity;
135 if (modified.remaining_time) modified.remaining_time = Infinity;
136 if (modified.hasUnlimitedAccess !== undefined) modified.hasUnlimitedAccess = true;
137 if (modified.has_unlimited_access !== undefined) modified.has_unlimited_access = true;
138 if (modified.isPremium !== undefined) modified.isPremium = true;
139 if (modified.is_premium !== undefined) modified.is_premium = true;
140
141 // Recursively modify nested objects
142 for (let key in modified) {
143 if (modified[key] && typeof modified[key] === 'object') {
144 modified[key] = modifyResponseData(modified[key]);
145 }
146 }
147
148 return modified;
149 }
150
151 // Clear any existing timers that might be used for time limits
152 const originalSetTimeout = window.setTimeout;
153 const originalSetInterval = window.setInterval;
154 const suspiciousTimers = new Set();
155
156 window.setTimeout = function(callback, delay, ...args) {
157 // Block timers that might be related to session timeouts (typically long delays)
158 if (delay > 60000) { // More than 1 minute
159 console.log('Blocked potential timeout timer:', delay);
160 return -1;
161 }
162 return originalSetTimeout.call(this, callback, delay, ...args);
163 };
164
165 window.setInterval = function(callback, delay, ...args) {
166 // Block intervals that might be checking time limits
167 if (delay > 30000) { // More than 30 seconds
168 console.log('Blocked potential timeout interval:', delay);
169 return -1;
170 }
171 return originalSetInterval.call(this, callback, delay, ...args);
172 };
173
174 // Monitor and clear localStorage/sessionStorage for time-related restrictions
175 function clearTimeRestrictions() {
176 try {
177 const keysToCheck = [...Object.keys(localStorage), ...Object.keys(sessionStorage)];
178
179 keysToCheck.forEach(key => {
180 const lowerKey = key.toLowerCase();
181 if (lowerKey.includes('time') || lowerKey.includes('limit') ||
182 lowerKey.includes('expire') || lowerKey.includes('disabled') ||
183 lowerKey.includes('suspend') || lowerKey.includes('block')) {
184
185 try {
186 const value = localStorage.getItem(key) || sessionStorage.getItem(key);
187 if (value) {
188 const parsed = JSON.parse(value);
189 const modified = modifyResponseData(parsed);
190
191 if (localStorage.getItem(key)) {
192 localStorage.setItem(key, JSON.stringify(modified));
193 }
194 if (sessionStorage.getItem(key)) {
195 sessionStorage.setItem(key, JSON.stringify(modified));
196 }
197 }
198 } catch (e) {
199 // Not JSON, skip
200 }
201 }
202 });
203 } catch (error) {
204 console.error('Error clearing time restrictions:', error);
205 }
206 }
207
208 // Run immediately and periodically
209 clearTimeRestrictions();
210 setInterval(clearTimeRestrictions, 5000);
211
212 // Override Date.now() and performance.now() for components that track time locally
213 const startTime = Date.now();
214 const originalDateNow = Date.now;
215 const originalPerformanceNow = performance.now.bind(performance);
216
217 // Store original time tracking
218 let timeOffset = 0;
219
220 // Prevent time-based restrictions by freezing time for session checks
221 function createTimeProxy() {
222 const handler = {
223 get(target, prop) {
224 if (prop === 'now') {
225 return function() {
226 // Return a time that doesn't progress for session timeout checks
227 return startTime;
228 };
229 }
230 return target[prop];
231 }
232 };
233
234 // Note: We don't actually override Date.now globally as it would break too many things
235 // Instead, we intercept API responses which is more reliable
236 }
237
238 console.log('Sesame AI Unlimited Access: All time limits and account restrictions disabled');
239
240 // Add visual indicator
241 function addIndicator() {
242 const indicator = document.createElement('div');
243 indicator.id = 'unlimited-access-indicator';
244 indicator.textContent = '∞ Unlimited Access Active';
245 indicator.style.cssText = `
246 position: fixed;
247 top: 10px;
248 right: 10px;
249 background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
250 color: white;
251 padding: 8px 16px;
252 border-radius: 20px;
253 font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
254 font-size: 12px;
255 font-weight: 600;
256 z-index: 999999;
257 box-shadow: 0 4px 12px rgba(0,0,0,0.15);
258 cursor: pointer;
259 transition: all 0.3s ease;
260 `;
261
262 indicator.addEventListener('mouseenter', () => {
263 indicator.style.transform = 'scale(1.05)';
264 });
265
266 indicator.addEventListener('mouseleave', () => {
267 indicator.style.transform = 'scale(1)';
268 });
269
270 indicator.addEventListener('click', () => {
271 indicator.style.opacity = indicator.style.opacity === '0.3' ? '1' : '0.3';
272 });
273
274 document.body.appendChild(indicator);
275 }
276
277 // Wait for body to be ready
278 if (document.body) {
279 addIndicator();
280 } else {
281 const observer = new MutationObserver(() => {
282 if (document.body) {
283 addIndicator();
284 observer.disconnect();
285 }
286 });
287 observer.observe(document.documentElement, { childList: true, subtree: true });
288 }
289
290})();