Skip to content

Instantly share code, notes, and snippets.

@Kaelzs
Created May 14, 2024 12:38
Show Gist options
  • Save Kaelzs/cff6f32bc7a629c7f43696007beab598 to your computer and use it in GitHub Desktop.
Save Kaelzs/cff6f32bc7a629c7f43696007beab598 to your computer and use it in GitHub Desktop.
Using ChatGPT on Mac
const responseBody = JSON.parse($response.body)
function replaceFalseWithTrue(obj) {
for (const key in obj) {
if (typeof obj[key] === 'object' && obj[key] !== null) {
replaceFalseWithTrue(obj[key]);
} else if (key !== 'is_device_based' && obj[key] === false) {
obj[key] = true;
}
}
}
replaceFalseWithTrue(responseBody)
const body = JSON.stringify(responseBody)
$done({body})
#!name=Make Mac ChatGPT Available
#!desc=Make your mac ChatGPT available!
[MITM]
hostname = %APPEND% ab.chatgpt.com
[Script]
replace = type=http-response,pattern=^https?://ab.chatgpt.com/v1/initialize,requires-body=1,max-size=0,script-path=chatGPT-mac.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment