Autosave Form Inputs and Display Saved Entries

Autosaves and displays entries from a single input field. Entries can be recovered or deleted. Dropdown only shows when clicking on the input field

Skaber
Lawrence d'Aniello
Daglige installationer
0
Installationer i alt
6
Bedømmelser
0 0 0
Version
2024-08-13
Oprettet
10.08.2024
Opdateret
13.08.2024
Size
5,5 kB
Licens
MIT
Gælder for

Autosave form inputs and display 15-Item History, so you can easily recover lost data.

Chrome's autocomplete system is designed to prioritize a mix of recent and frequently used entries. This means:

Recent entries are often suggested but might not always appear immediately.
Frequently used entries tend to have higher priority and appear more consistently.

This userscript addresses this limitation by maintaining a list of the last 15 entries entered.

Please note that you will need to customize the script for your specific use case:

1. Modify the website URL in the match metadata to target the correct site.
2. Update the input and button selectors (lines 25 and 26 of the code) to match your site’s elements. To find the correct selectors in Chrome, right-click on the element, select "Inspect," right-click the highlighted code, and choose "Copy" > "Copy selector."
3. Optionally, customize the number of entries to display by adjusting line 60 of the code.

To add a second field, simply change 'savedInputEntries1' to 'savedInputEntries2' and 'savedInputEntriesDropdown1' to 'savedInputEntriesDropdown2'.
Apply the same pattern for additional fields.