{
"registration_country": null,
"require_cookie_consent": false,
"terms_of_use": null,
"cookie_consent": null,
"age_verification": null
}
{
"registration_country": "DE",
"require_cookie_consent": false,
"terms_of_use": {
"is_required": false,
"display": null
},
"cookie_consent": {
"is_required": false
},
"age_verification": {
"is_required": false
}
}
// s.terms_of_use.is_required <- crashed
s?.terms_of_use?.is_required // fixed
function eb(y) {
var et = (0,
ed.H)().isPluginsAvailable
, en = (0,
ef.NL)();
return (0,
eh.a)({
queryKey: ["plugins", Y.sort().join("") ]'
queryFn:eg,
initialData: function() {
var et = null === (ef = en.getQueryData(em.Z))
,ei = null === (eh = en.getQueryData(ep.V))
,ea = []
,eu = !0
,ec = !1
,ed = void 0;
try {
for (var ef, eh, eg, ey = function() {
var Y, en = eg.value, eo = null !== (Y
return Y.id === en
})) && void 0 !== Y ? Y : null == ei ?
return Y.id === en
});
if (null){
// ==UserScript==
// @name ChatGPT Fix
// @namespace http://tampermonkey.net/
// @Version 0.1
// @description Fix ChatGPT issue
// @author Laurent Warin
// @match https://chat.openai.com/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
// Function to modify the server's response
function modifyServerResponse(originalResponse) {
let modifiedResponse = originalResponse;
// Check and modify modifiedResponse as needed
// For example, check if certain properties are null and replace them
if (modifiedResponse.terms_of_use === null) {
modifiedResponse.terms_of_use = { is_required: false };
}
return modifiedResponse;
}
// Intercept XHR requests
XMLHttpRequest.prototype.realSend = XMLHttpRequest.prototype.send;
XMLHttpRequest.prototype.send = function(value) {
this.addEventListener('load', function() {
if (this.responseURL === "https://chat.openai.com/backend-api/compliance") {
let response = JSON.parse(this.responseText);
let modified = modifyServerResponse(response);
Object.defineProperty(this, 'responseText', { writable: true });
this.responseText = JSON.stringify(modified);
}
});
this.realSend(value);
};
})();
{
"registration_country": null,
"require_cookie_consent": false,
"terms_of_use": null,
"cookie_consent": null,
"age_verification": null
}
{
"registration_country": "DE",
"require_cookie_consent": false,
"terms_of_use": {
"is_required": false,
"display": null
},
"cookie_consent": {
"is_required": false
},
"age_verification": {
"is_required": false
}
}
// s.terms_of_use.is_required <- crashed
s?.terms_of_use?.is_required // fixed
function eb(y) {
var et = (0,
ed.H)().isPluginsAvailable
, en = (0,
ef.NL)();
return (0,
eh.a)({
queryKey: ["plugins", Y.sort().join("") ]'
queryFn:eg,
initialData: function() {
var et = null === (ef = en.getQueryData(em.Z))
,ei = null === (eh = en.getQueryData(ep.V))
,ea = []
,eu = !0
,ec = !1
,ed = void 0;
try {
for (var ef, eh, eg, ey = function() {
var Y, en = eg.value, eo = null !== (Y
return Y.id === en
})) && void 0 !== Y ? Y : null == ei ?
return Y.id === en
});
if (null){
// ==UserScript==
// @name ChatGPT Fix
// @namespace http://tampermonkey.net/
// @Version 0.1
// @description Fix ChatGPT issue
// @author Laurent Warin
// @match https://chat.openai.com/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
})();