Chatgpt Unofficial Notepad

Adds a small context window for note taking on the openai.com website for usages with chatgpt.

Author
leftover
Daily installs
0
Total installs
98
Ratings
0 0 0
Version
1.0
Created
2023-05-17
Updated
2023-05-17
License
MIT
Applies to

Chat gpt 3.5 wrote this:

Text Windows: The script creates multiple text windows where users can take notes. By default, there are 5 text windows. Each text window contains a title input and a textarea.

Title Input: The title input allows users to set a title for each text window. The initial title for each window is "Window 1", "Window 2", and so on. Users can click on the title input and change the title text. The script automatically saves the title to the browser's localStorage whenever the input value changes.

Textarea: The textarea is the main content area where users can enter their notes. It has a dark background and white text. Users can click inside the textarea and start typing their notes. The script also saves the content of the textarea to localStorage whenever it changes.

Switching Between Text Windows: Users can navigate between different text windows using the "Prev" and "Next" buttons provided in the floating window. Clicking the "Prev" button will hide the current text window and display the previous one. Clicking the "Next" button will hide the current text window and display the next one. The script wraps around from the first window to the last and vice versa.

Floating Window: The floating window is a small, draggable window that contains the text windows and navigation buttons.

Position: The floating window is positioned at the top right corner of the page using the position: fixed CSS property.

Draggable: Users can drag the floating window by clicking and dragging anywhere inside the window.

Background and Border: The floating window has a dark background color and a white border.

Title and Content: The floating window displays the currently active text window's title and content.

Saving and Retrieving Data: The script uses the browser's localStorage to save and retrieve the title and content of each text window.

Saving Title: Whenever a user changes the title input of a text window, the script saves the updated title to localStorage using the key format: "textWindowTitle_" + windowIndex. The windowIndex is the index of the corresponding text window.

Saving Content: Whenever a user changes the content of a text window's textarea, the script saves the updated content to localStorage using the key format: "textWindow_" + windowIndex. Again, windowIndex represents the index of the text window.

Retrieving Title and Content: When the page is reloaded, the script retrieves the saved title and content from localStorage and populates the corresponding elements (title input and textarea) with the saved values.