From d9d3aba80b83ec2e3e2ca8c8d68c7963978e4c85 Mon Sep 17 00:00:00 2001 From: Ron Nuss Date: Fri, 20 Oct 2023 11:02:15 +0300 Subject: [PATCH] feat(v0.4.8): upgrade to plus, modified header --- README.md | 55 +++++++++++++++++++++++++-------------------------- index.js | 43 +++++++++++++++++++++++++++++----------- manifest.json | 24 +++++++++++----------- 3 files changed, 72 insertions(+), 50 deletions(-) diff --git a/README.md b/README.md index 659b15a..42424ee 100644 --- a/README.md +++ b/README.md @@ -1,56 +1,55 @@ -

fake-chatgpt-plus

+

Fake ChatGPT Plus

- Version + Version: 0.4.8 License: MIT

-> A chrome extension that makes it look like you have ChatGPT Plus. Designed for free users only. +> A chrome extension (also works for other chromium browsers) that makes it look like you have ChatGPT Plus. Designed for free users only. ## Install -- Click on the green "code" button -- Select download zip + +- Click on the green "Code" button +- Select "Download zip" ## Usage -- Unzip the folder -- Go to [Chrome's Manage Extensions page](chrome://extensions/) -- Toggle the "developer mode" option + +- Unzip the downloaded folder +- Go to your browser's manager extensions page. For example, on chrome: `chrome://extensions/`. +- Toggle the "Developer mode" option - Click on "Load unpacked" button - Select your unzipped folder - Go to [ChatGPT's website](https://chat.openai.com) - Enjoy your fake looking ChatGPT Plus! -## Author - -👤 **Ron Nuss** - -* Website: https://itsron.space -* Github: [@itsrn](https://github.com/itsrn) -* LinkedIn: [@itsrn](https://linkedin.com/in/itsrn) - ## 🤝 Contributing -Contributions, issues and feature requests are welcome!
Feel free to check [issues page](https://github.com/itsrn/fake-chatgpt-plus/issues). +Contributions, issues and feature requests are welcome!
Feel free to check [issues page](https://github.com/itsrn/fake-chatgpt-plus/issues). ## Show your support Give a ⭐️ if you likes this project and want to support me! ## Version History -* 0.4.6 *(Supported and Recommended)* - * Fixed ChatGPT's logo background color is not changed to purple (like the GPT 4 one) -* 0.4.4 *(Not supported)* - * Fixed ["Upgrade to plus" button to stop showing](https://github.com/itsrn/fake-chatgpt-plus/issues/3) -* 0.4.2 *(Not supported)* - * Fixed [Profile buttons doesn't appear](https://github.com/itsrn/fake-chatgpt-plus/issues/1). -* 0.4.0 *(Not supported)* - * Initial Release. + +- 0.4.8 + - Fixed the "Upgrade to plus" button being shown + - Updated the header ("`Default (GPT-X)`") text to GPT-4 + +> All of the versions below `v0.4.8` are now counted as legacy versions that +> are not support or recommended. Please upgrade to newer version if you are using one of them. + +- 0.4.6 + - Fixed ChatGPT's logo background color is not changed to purple (like the GPT 4 one) +- 0.4.4 + - Fixed ["Upgrade to plus" button to stop showing](https://github.com/itsrn/fake-chatgpt-plus/issues/3) +- 0.4.2 + - Fixed [Profile buttons doesn't appear](https://github.com/itsrn/fake-chatgpt-plus/issues/1). +- 0.4.0 + - Initial Release. ## 📝 License Copyright © 2023 [Ron Nuss](https://github.com/itsrn).
This project is [MIT](https://github.com/itsrn/fake-chatgpt-plus/blob/main/LICENSE) licensed. - -*** -_This README was generated with [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_ \ No newline at end of file diff --git a/index.js b/index.js index f64f2e0..3bcc8bc 100644 --- a/index.js +++ b/index.js @@ -1,15 +1,32 @@ function removeUpgradeButton() { const upgradeToPlusButton = document.querySelectorAll( - ".flex.px-3.min-h-\\[44px\\].py-1.items-center.gap-3.transition-colors.duration-200.text-white.cursor-pointer", - ".text-sm.hover\\:bg-gray-800.rounded-md" + ".flex.px-3.py-1.items-center.gap-3.transition-colors.duration-200.cursor-pointer.text-sm.rounded-md" )[2]; //gets the "upgrade to plus" button element - if (upgradeToPlusButton && upgradeToPlusButton.role !== "menuitem") { + if ( + upgradeToPlusButton && + upgradeToPlusButton.textContent == "Upgrade to Plus" + ) { upgradeToPlusButton.remove(); //if exists in page and isn't a button in the profile menu then remove it } } +function updateHeaderChatModel() { + const HeaderSpan = document.querySelector( + ".flex.flex-1.flex-grow.items-center.gap-1.px-2.py-1.text-gray-600.dark\\:text-gray-200.sm\\:justify-center.sm\\:p-0" + ); + //gets the header span element + + if (HeaderSpan) { + //if it exists + if (HeaderSpan.children[0].textContent == "Default (GPT-3.5)") { + //and if the model specified there isn't GPT-4 change it + HeaderSpan.children[0].textContent = "Default (GPT-4)"; + } + } +} + function updateChatGptIcons() { const ChatGptIcons = document.querySelectorAll( ".relative.p-1.rounded-sm.text-white.flex.items-center" @@ -43,16 +60,19 @@ function changeButtonBackgroundColor() { } /* -Currently causing weird freezes of the website so it is not included, -until i'll find a fix for that freeze issue. - +! Currently causing weird freezes of the website so it is not included, +! until i'll find a fix for that freeze issue. +* Although what mentioned above, using this function code in the browser +* console will work just fine. +*/ +/* function updateHeaderText() { - const headerElement = document.querySelector( - ".text-4xl.font-semibold.text-center.mt-6.ml-auto.mr-auto.mb-4.sm\\:mb-16.flex.gap-2.items-center.justify-center" + const centeredTextElement = document.querySelector( + ".text-4xl.font-semibold.text-center.text-gray-200.ml-auto.mr-auto.mb-10.flex.gap-2.items-center.justify-center.flex-grow" ); - - if (headerElement) { - headerElement.innerHTML = + + if (centeredTextElement) { + centeredTextElement.innerHTML = 'ChatGPT PLUS'; } } @@ -62,6 +82,7 @@ function handleMutations() { removeUpgradeButton(); changeButtonBackgroundColor(); updateChatGptIcons(); + updateHeaderChatModel(); } const observer = new MutationObserver(handleMutations); diff --git a/manifest.json b/manifest.json index 3c1b915..837c92b 100644 --- a/manifest.json +++ b/manifest.json @@ -1,12 +1,14 @@ { - "manifest_version": 3, - "name": "Fake ChatGPT Plus", - "version": "0.4.2", - "description": "Make it look like you have ChatGPT Plus", - "host_permissions": ["https://chat.openai.com/*"], - "content_scripts": [{ - "matches": ["https://chat.openai.com/*"], - "js": ["index.js"], - "run_at": "document_idle" - }] -} \ No newline at end of file + "manifest_version": 3, + "name": "Fake ChatGPT Plus", + "version": "0.4.8", + "description": "Make it look like you have ChatGPT Plus.", + "host_permissions": ["https://chat.openai.com/*"], + "content_scripts": [ + { + "matches": ["https://chat.openai.com/*"], + "js": ["index.js"], + "run_at": "document_idle" + } + ] +}