-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathpopup.html
More file actions
1673 lines (1635 loc) · 72.8 KB
/
popup.html
File metadata and controls
1673 lines (1635 loc) · 72.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!-- popup.html -->
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>OneClickPrompts Options</title>
<!-- Base styles: Root variables, body, container, section, and headings -->
<link rel="stylesheet" href="/popup-page-styles/popup-base.css" />
<!--The styles related to menu - topmost section -->
<link rel="stylesheet" href="/popup-page-styles/menu.css" />
<!-- Layout styles: Row layouts, form controls, and profile action containers -->
<link rel="stylesheet" href="/popup-page-styles/popup-layout.css" />
<!-- Custom buttons: Button list container, button items, drag handles, and separators -->
<link rel="stylesheet" href="/popup-page-styles/popup-buttons.css" />
<!-- UI Components: Console, save status, export/import buttons, confirmation & error dialogs, and toast notifications -->
<link rel="stylesheet" href="/popup-page-styles/popup-components.css" />
<link rel="stylesheet" href="/popup-page-styles/modal.css" />
<link rel="stylesheet" href="/common-ui-elements/onclick-smooth-scroll-highlight.css" />
<!-- Toggle switch styles: iPhone-style toggle switches -->
<link rel="stylesheet" href="/common-ui-elements/toggle.css" />
<!-- Theme overrides: Dark mode styles -->
<link rel="stylesheet" href="/common-ui-elements/dark-theme.css" />
<link rel="stylesheet" href="/common-ui-elements/common-style.css" />
<!-- Toast notifications -->
<link rel="stylesheet" href="/common-ui-elements/ocp_toast.css" />
<!-- Ultramodern frosted glass tooltips -->
<link rel="stylesheet" href="/common-ui-elements/ocp_tooltip.css" />
</head>
<body>
<div class="container">
<!--Menu Section - Navigation with frosted glass buttons-->
<section class="section" id="menuSection">
<nav class="menu-nav" aria-label="Page navigation">
<a href="#profileSection" class="menu-btn" data-scroll-only>
<span class="menu-btn-icon">👤</span>Profile
</a>
<a href="#settingsSection" class="menu-btn" data-scroll-only>
<span class="menu-btn-icon">⚙️</span>Settings
</a>
<a href="#backupSection" class="menu-btn" data-scroll-only>
<span class="menu-btn-icon">💾</span>Backup
</a>
<a href="#modulesSection" class="menu-btn" data-scroll-only>
<span class="menu-btn-icon">🧩</span>Modules
</a>
<a href="#helpSection" class="menu-btn" data-scroll-only>
<span class="menu-btn-icon">❓</span>Help
</a>
<a href="#advancedSection" class="menu-btn" data-scroll-only>
<span class="menu-btn-icon">🔧</span>Advanced
</a>
<a href="#themeSection" class="menu-btn" data-scroll-only>
<span class="menu-btn-icon">🎨</span>Theme
</a>
<button id="open-in-tab-button" class="menu-btn">
<span class="menu-btn-icon">↗️</span>Open this page in Tab
</button>
<button id="toggle-width-button" class="menu-btn is-hidden">
<span class="menu-btn-icon">↔️</span>Wider
</button>
</nav>
<div id="version" class="small-hoovering-text menu-version">Version 0.0.6.1</div>
</section>
<!-- Button Configuration via button cards (buttons have their UI - each on card that is added dynamically) -->
<section class="section" id="buttonConfigurationSection">
<h2 title="Here, each 'card' represents a button that will be injected into the chat interface and the text it will paste.">Button Configuration</h2>
<div class="add-button-group">
<div class="row">
<input
type="text"
id="buttonIcon"
placeholder="✨"
class="emoji-input"
title="Button icon that will be clickable in the chat interface, or you may have text here or multiple emojis. (Emoji menu Win+. Or you may ask AI for them and copy)"
aria-label="Button icon"
/>
<textarea
id="buttonText"
placeholder="Button Template Text To be Inserted"
class="text-input"
rows="1"
title="This will be inserting text into the chat input when the button is clicked, into textbox after your text"
aria-label="Button template text"
></textarea>
<label
class="checkbox-row"
for="buttonAutoSendToggle"
title="If checked, clicking the new button will automatically send the prompt. This setting can be overridden by the global auto-send toggle below."
>
<input type="checkbox" id="buttonAutoSendToggle" checked />
<span>Auto-send</span>
</label>
</div>
<div class="row">
<button
id="addButton"
title="Add a new prompt button using the icon, text, and auto-send setting from above."
>
Add Button
</button>
<button
id="clearText"
title="Clear the icon and text fields for adding a new button."
>
Clear Text
</button>
</div>
</div>
<div class="row">
<button
id="addSeparator"
title="Add a visual separator like this '|' to the button list to organize your prompts."
>
Add Separator → | ← like this
</button>
<button
id="addSettingsButton"
title="Add a special Settings button (default icon ⚙️) that opens this extension's settings page in a new browser tab. Shift-Click this button to move location, where OneClickPrompts injects its buttons"
>
Add Settings Button ⚙️
</button>
</div>
<div id="buttonCardsList" data-draggable="true">
<!-- Button cards added dynamically here -->
</div>
</section>
<!-- Profile Section -->
<section class="section profile-section" id="profileSection">
<h2 title="The profile is containing set of buttons inside it. Profile changing allows you to use different sets of buttons for different tasks">Profile</h2>
<div class="row">
<label
for="profileSelect"
id="currentProfileLabel"
class="profile-context-label is-hidden"
>Your current profile:</label
>
<select
id="profileSelect"
title="Select profile"
aria-label="Select profile"
>
<option value="default">Default Profile</option>
</select>
<button id="addProfile" title="Create a new, empty profile.">
Add Profile
</button>
<button
id="copyProfile"
title="Duplicate the current profile with all its buttons and settings to new profile that you will name."
>
Duplicate Current Profile To A New One
</button>
<button
id="deleteProfile"
class="danger"
title="Delete the currently selected profile. The 'Default' profile cannot be deleted."
>
Delete
</button>
<div id="versionContainer">
<p id="topExplanationText">
Your changes to the buttons will be saved automatically. Reload
website in case of troubles. Pressing "Shift" while pressing a key or button
changes its autosend behavior! <a href="#helpSection">Go to Help Section</a>
<span class="settings-move-rainbow">New feature: you can now move buttons by Shift-clicking on the Settings (⚙️) button.</span> More info in help.
Author is dedicated to help you, if problems arise, contact me via email (forpphotos@gmail.com) or GitHub Discussions.
</p>
</div>
</div>
<!-- Add Profile Input and Save/Cancel Buttons -->
<div
id="addProfileContainer"
class="profile-action-container is-hidden"
>
<label for="addProfileInput">Enter new profile name:</label>
<input
type="text"
id="addProfileInput"
placeholder="Enter profile name here"
title="New profile name"
/>
<button
id="saveAddProfile"
title="Save the new profile with the name entered above."
>
Save
</button>
<button
id="cancelAddProfile"
class="danger"
title="Cancel creating a new profile and hide this input."
>
Cancel
</button>
</div>
<!-- Copy Profile Input and Save/Cancel Buttons -->
<div
id="copyProfileContainer"
class="profile-action-container is-hidden"
>
<label for="copyProfileInput">Enter duplicate profile name:</label>
<input
type="text"
id="copyProfileInput"
placeholder="Enter duplicate profile name here"
title="Name for the duplicated profile"
/>
<button id="saveCopyProfile">Save</button>
<button id="cancelCopyProfile" class="danger">Cancel</button>
</div>
</section>
<!-- ===== Settings ===== -->
<section class="section" id="settingsSection">
<h2>Settings</h2>
<div class="row settings-linked-row">
<label
class="checkbox-row"
for="autoSendToggle"
id="autoSendToggleLabel"
title="Default for new sites. Each site remembers its own setting after you toggle it on the chat page. This only affects sites where you haven't changed the toggle yet."
>
<input type="checkbox" id="autoSendToggle" />
<span
>Auto-send (default for new sites)</span
>
</label>
<label
class="checkbox-row"
for="hideOnPageAutoSendToggle"
id="hideOnPageAutoSendToggleLabel"
title="This controls visibility of the on-page Auto-send checkbox near your injected button row."
>
<input type="checkbox" id="hideOnPageAutoSendToggle" />
<span>Hide Auto-send on-page control</span>
</label>
</div>
<div class="row settings-linked-row">
<label
class="checkbox-row"
for="shortcutsToggle"
id="shortcutsToggleLabel"
title="Default for new sites. Each site remembers its own setting after you toggle it on the chat page. This only affects sites where you haven't changed the toggle yet."
>
<input type="checkbox" id="shortcutsToggle" />
<span>Keyboard Shortcuts (default for new sites)</span>
</label>
<label
class="checkbox-row"
for="hideOnPageHotkeysToggle"
id="hideOnPageHotkeysToggleLabel"
title="This controls visibility of the on-page Hotkeys checkbox near your injected button row."
>
<input type="checkbox" id="hideOnPageHotkeysToggle" />
<span>Hide Hotkeys on-page control</span>
</label>
</div>
<div class="row">
<button
id="revertDefault"
class="danger"
title="Reset all buttons and settings in the current profile back to the extension's defaults."
>
Revert Current Profile to Default
</button>
</div>
<!-- Floating Window Settings -->
<div class="collapsible" id="floatingWindowSettingsSection">
<div class="section-header">
<h2>
Floating Window Settings
<span class="expand-text">(click to expand)</span>
</h2>
<span class="toggle-icon">▶</span>
</div>
<div class="section-content">
<div class="row queue-setting-row">
<label
class="checkbox-row"
for="hideOnPageFloatingPanelToggle"
id="hideOnPageFloatingPanelToggleLabel"
title="Hide the floating panel on-page toggle button (🔼) for cleaner UI."
>
<input type="checkbox" id="hideOnPageFloatingPanelToggle" />
<span>Hide floating panel toggle button (🔼)</span>
</label>
</div>
<div id="panelPositionSettings">
<div class="subsection-header">
<h3>Panel Position & Reset (Floating Panel position is profile independent)</h3>
</div>
<div class="text-inside-container">
<p>
Reset the position, size, and visibility of the floating panel.
This can fix issues if the panel becomes stuck or invisible.
</p>
</div>
<div id="floatingWindowSitesList" class="floating-sites-list">
<!-- Site-specific reset buttons will be added here dynamically by js-->
<p class="empty-message is-hidden">
No saved settings found for any website.
</p>
</div>
<div class="row mt-16">
<button
id="resetAllFloatingWindowSettings"
class="danger"
title="Reset floating window settings for ALL websites."
>
Reset settings for all websites
</button>
</div>
</div>
<hr class="section-divider">
<div id="advancedQueueSettings">
<div class="subsection-header">
<h3>Advanced Queue Settings (These settings will be individual for each profile.)</h3>
</div>
<div class="text-inside-container">
<p>
Configure optional queue controls that apply to every profile. Random
delay adds a slight positive offset to the base delay to help space
requests. Hiding the activation toggle prevents enabling the queue
from the floating panel.
</p>
</div>
<div class="row queue-setting-row">
<label
class="checkbox-row"
for="queueHideActivationToggle"
title="Hide the queue activation toggle in the floating panel. This also turns queue mode off immediately."
>
<input type="checkbox" id="queueHideActivationToggle" />
<span>Hide queue activation toggle</span>
</label>
</div>
<div class="row queue-setting-row">
<label
class="checkbox-row"
for="queueRandomizeEnabled"
title="Add a random positive offset to the queue delay based on the percentage below."
>
<input type="checkbox" id="queueRandomizeEnabled" />
<span>Enable random delay offset</span>
</label>
</div>
<div class="row queue-setting-row" id="queueRandomizePercentRow">
<label
for="queueRandomizePercent"
title="Maximum percentage of the base delay used as the random offset. Range: 1% to 100%."
>
Random offset range (%)
</label>
<input
type="number"
id="queueRandomizePercent"
min="1"
max="100"
step="1"
value="5"
title="Maximum percent of the base delay used as the random offset (1–100)."
/>
</div>
</div>
</div>
</div>
<!-- Tooltip Settings -->
<div class="collapsible" id="tooltipSettingsSection">
<div class="section-header">
<h2>
Tooltip Settings
<span class="expand-text">(click to expand)</span>
</h2>
<span class="toggle-icon">▶</span>
</div>
<div class="section-content">
<div class="text-inside-container mb-16">
<p>
Configure the frosted glass tooltips that appear when hovering over buttons and elements.
</p>
</div>
<div class="row">
<div class="toggle-container">
<div class="toggle">
<input
type="checkbox"
id="tooltipEnableToggle"
class="toggle__input"
aria-label="Enable frosted glass tooltips"
/>
<label for="tooltipEnableToggle" class="toggle__label">
<span class="toggle__emoji"></span>
<span class="toggle__emoji"></span>
</label>
</div>
<span class="switch-label">Enable frosted glass tooltips</span>
</div>
</div>
<!-- Settings visible when enabled -->
<div id="tooltipSettingsContainer" class="is-hidden ml-20">
<div class="row mt-16">
<label for="tooltipShowDelay" class="min-w-120"
>Show delay (ms):</label
>
<input
id="tooltipShowDelay"
type="number"
inputmode="numeric"
step="50"
min="0"
max="5000"
value="400"
title="Time in milliseconds before tooltip appears after hover. 0 = instant."
class="input-number-compact"
/>
<button
id="tooltipShowDelayReset"
class="btn-compact"
title="Reset to default (400ms)"
>
Reset
</button>
</div>
<div class="row mt-16">
<label for="tooltipFontColor" class="min-w-120"
>Text color:</label
>
<input
id="tooltipFontColor"
type="color"
value="#ffffff"
title="Custom tooltip text color. Leave default for theme-aware automatic coloring."
class="input-color-compact"
/>
<button
id="tooltipFontColorReset"
class="btn-compact"
title="Reset to default (theme-aware automatic coloring)"
>
Reset
</button>
</div>
<!-- Theme Override -->
<div class="row mt-16">
<label class="checkbox-row" for="tooltipThemeOverride">
<input type="checkbox" id="tooltipThemeOverride" />
<span>Override tooltip theme</span>
</label>
</div>
<div id="tooltipThemeRadioContainer" class="is-hidden ml-20 mt-8">
<div class="text-inside-container mb-8">
<p>By default, tooltips follow page theme (if detected) or OS preference as fallback.</p>
</div>
<div>
<label>
<input
type="radio"
name="tooltipThemeChoice"
value="dark"
checked
/>
Always Dark
</label>
</div>
<div class="mt-8">
<label>
<input
type="radio"
name="tooltipThemeChoice"
value="light"
/>
Always Light
</label>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Backup Section -->
<section class="section" id="backupSection">
<h2>Backup & Restore</h2>
<div class="row">
<button
id="exportProfile"
title="Download the current profile's settings as a JSON backup file. You can then import this file to another computer or restore in case of data loss."
>
Export Profile
</button>
<button
id="importProfile"
title="Import a profile's settings from a JSON backup file."
>
Import Profile
</button>
<!-- Hidden file input for importing profile -->
<input
type="file"
id="importFileInput"
accept="application/json"
class="visually-hidden"
title="Import profile file"
aria-label="Import profile file"
/>
</div>
<!-- Confirmation Div -->
<div
id="confirmationDiv"
class="dialog dialog-confirmation is-hidden"
>
<p>
File loaded successfully, but a profile with the same name already
exists in the system. Do you want to overwrite the existing profile?
</p>
<button id="confirmOverwrite">Yes</button>
<button id="cancelOverwrite">No</button>
</div>
<!-- Error Message Div -->
<div id="errorDiv" class="dialog dialog-error is-hidden">
<p>
Error loading file. Please ensure the file is a valid JSON profile.
</p>
</div>
</section>
<!-- Console -->
<section class="section">
<h2>Console</h2>
<div id="console" class="console"></div>
</section>
<!-- ===== Modules Section ===== -->
<!-- This is a top-level collapsible container. The .collapsible class enables the expand/collapse behavior via popup-page-collapsible.js -->
<section class="section collapsible" id="modulesSection">
<div class="section-header">
<h2>
Modules
<span class="expand-text">(click to expand)</span>
</h2>
<span class="toggle-icon">▶</span>
</div>
<div class="section-content">
<!-- Cross-Chat Prompt Sharing Module -->
<!-- This is a nested collapsible module. It has its own .collapsible class and header. -->
<!-- Its functionality is managed by popup-page-modules-promptShare.js, but its collapsible behavior is managed centrally by popup-page-collapsible.js -->
<div class="collapsible" id="crossChatModule">
<div class="section-header subsection-header">
<h3>
Cross-Chat Prompt Sharing
<span class="expand-text">(click to expand)</span>
</h3>
<span class="toggle-icon">▶</span>
</div>
<div class="section-content" id="crossChatModuleContent">
<div class="toggle-container mb-16">
<div class="toggle">
<input
type="checkbox"
id="crossChatModuleEnableToggle"
class="toggle__input"
aria-label="Enable Cross-Chat Prompt Sharing"
/>
<label for="crossChatModuleEnableToggle" class="toggle__label">
<span class="toggle__emoji"></span>
<span class="toggle__emoji"></span>
</label>
</div>
<span class="switch-label"
>Enable Cross-Chat Prompt Sharing</span
>
</div>
<!-- Cross Chat Module Settings Settings - collapsed by default -->
<div id="crossChatModuleSettings" class="is-hidden">
<div class="text-inside-container mb-16">
<p>
This module streamlines your workflow when using multiple AI
chat services.
</p>
<ul>
<li>
<strong>How it works:</strong> On a supported chat page
(like ChatGPT), type a prompt and click the
<strong class="emoji-font">📋</strong>
button. Then, navigate to another chat page (like Claude)
and click the
<strong class="emoji-font">📥</strong>
button to paste the same prompt.
</li>
<li>
The prompt is stored globally, so you can copy it once and
paste it on multiple different sites. Hovering over the
<strong class="emoji-font">📥</strong>
button on a chat page will show you the stored prompt in a
tooltip.
</li>
</ul>
</div>
<div class="row">
<label for="storedPromptDisplay">Stored Prompt:</label>
<textarea
id="storedPromptDisplay"
class="selector-config-textarea"
rows="4"
readonly
title="This read-only area shows the prompt that is currently saved in the extension's memory. Use the 'Refresh' button to update it."
placeholder="No prompt has been saved."
></textarea>
</div>
<div class="row justify-end">
<button
id="refreshStoredPrompt"
title="Manually fetch and display the currently stored prompt from memory. Useful if you've copied a new prompt in another tab and want to see it here."
>
Refresh
</button>
<button
id="clearStoredPrompt"
class="danger"
title="Permanently deletes the prompt currently stored in memory. This cannot be undone."
>
Clear Stored Prompt
</button>
</div>
<hr class="my-16" />
<h4>Settings</h4>
<fieldset
class="crosschat-setting-group"
id="crossChatAutosendGroup"
aria-disabled="false"
>
<legend>
<div class="toggle-container">
<div class="toggle">
<input type="checkbox" id="crossChatHideStandardButtons" class="toggle__input" />
<label for="crossChatHideStandardButtons" class="toggle__label">
<span class="toggle__emoji"></span>
<span class="toggle__emoji"></span>
</label>
</div>
<span class="switch-label"
>Hide standard Cross-Chat buttons</span
>
</div>
</legend>
<div
class="row"
title="If enabled, after you click the '📋 Copy' button on a chat page, the extension will also immediately 'send' the text in that same chat. This is useful for workflows where you want to send a prompt and simultaneously save it for use elsewhere."
>
<div class="toggle-container">
<div class="toggle">
<input type="checkbox" id="crossChatAutosendCopy" class="toggle__input" />
<label for="crossChatAutosendCopy" class="toggle__label">
<span class="toggle__emoji"></span>
<span class="toggle__emoji"></span>
</label>
</div>
<span class="switch-label">Autosend after 📋 Copy</span>
</div>
</div>
<div
class="row"
title="If enabled, clicking the '📥 Paste & Send' button will not only paste the stored prompt into the chat input but also automatically trigger the send action, submitting it to the AI."
>
<div class="toggle-container">
<div class="toggle">
<input type="checkbox" id="crossChatAutosendPaste" class="toggle__input" />
<label for="crossChatAutosendPaste" class="toggle__label">
<span class="toggle__emoji"></span>
<span class="toggle__emoji"></span>
</label>
</div>
<span class="switch-label"
>Autosend after 📥 Paste & Send</span
>
</div>
</div>
</fieldset>
<div
class="row"
title="When enabled, a broadcast button appears on chat pages. Clicking it will immediately paste and send the current text to every other supported tab. Use with extreme caution."
>
<div class="toggle-container">
<div class="toggle">
<input type="checkbox" id="crossChatDangerAutoSendAll" class="toggle__input" />
<label for="crossChatDangerAutoSendAll" class="toggle__label">
<span class="toggle__emoji"></span>
<span class="toggle__emoji"></span>
</label>
</div>
<span class="switch-label"
>Add dangerous button ⬆️: Auto sent text you have in editor to all instances of chats</span
>
</div>
</div>
<div class="text-inside-container">
<p>
<strong>Warning:</strong> With this toggle enabled, the new
broadcast button will immediately paste and send the current
editor text across <em>every</em> compatible chat tab that
accepts broadcasts. Messages can trigger on sites you have
open in the background, spend credits, or interrupt a reply
that is still generating. Double-check the text before you
launch it.
</p>
<p>
Shift-clicking the broadcast button toggles a shield icon.
Tabs showing the shield will keep sending out prompts but
will refuse automatic messages coming from other tabs until
you shift-click again.
</p>
</div>
<div
class="row flex-column-start"
>
<label>Button Placement:</label>
<div
class="mt-8"
title="Places the 📋 and 📥 buttons before your other custom buttons. They will be assigned shortcuts Alt+1 and Alt+2."
>
<label>
<input
type="radio"
name="crossChatButtonPlacement"
value="before"
checked
/>
Inject Cross-Chat Buttons <strong>Before</strong> Other
Custom Buttons
</label>
</div>
<div
title="Places the 📋 and 📥 buttons after all your other custom buttons. Their shortcuts will follow your last custom button."
>
<label>
<input
type="radio"
name="crossChatButtonPlacement"
value="after"
/>
Inject Cross-Chat Buttons <strong>After</strong> Other
Custom Buttons
</label>
</div>
</div>
</div>
</div>
</div>
<br /><br />
<!-- Inline Profile Selector Settings - collapsed by default -->
<div class="collapsible" id="inlineProfileSelectorModule">
<div class="section-header subsection-header">
<h3>
Inline Profile Selector
<span class="expand-text">(click to expand)</span>
</h3>
<span class="toggle-icon">▶</span>
</div>
<div class="section-content" id="inlineProfileSelectorContent">
<div class="toggle-container mb-16">
<div class="toggle">
<input
type="checkbox"
id="inlineProfileSelectorEnableToggle"
class="toggle__input"
/>
<label for="inlineProfileSelectorEnableToggle" class="toggle__label">
<span class="toggle__emoji"></span>
<span class="toggle__emoji"></span>
</label>
</div>
<span class="switch-label"
>Show profile selector in button row</span
>
</div>
<p class="text-inside-container">
The selector will appear among the custom buttons in the button
row, allowing you to switch the current profile quickly.
</p>
<!-- Settings visible when enabled -->
<div
id="inlineProfileSelectorSettingsContainer"
class="is-hidden ml-20"
>
<div class="text-inside-container mb-8">
<p>
Choose where the profile selector appears relative to your
custom buttons.
</p>
</div>
<div
class="row flex-column-start"
>
<label>Placement:</label>
<div class="mt-8">
<label>
<input
type="radio"
name="inlineProfileSelectorPlacement"
value="before"
checked
/>
Before custom buttons
</label>
</div>
<div>
<label>
<input
type="radio"
name="inlineProfileSelectorPlacement"
value="after"
/>
After custom buttons
</label>
</div>
</div>
</div>
</div>
</div>
<br /><br />
<!-- ChatGPT Token Approximator Settings - collapsed by default -->
<div class="collapsible" id="chatgptTokenApproximatorModule">
<div class="section-header subsection-header">
<h3>
Token Counter (Approximator)
<span class="expand-text">(click to expand)</span>
</h3>
<span class="toggle-icon">▶</span>
</div>
<div class="section-content" id="tokenApproximatorContent">
<div class="toggle-container mb-16">
<div class="toggle">
<input
type="checkbox"
id="chatgptTokenApproximatorEnableToggle"
class="toggle__input"
/>
<label for="chatgptTokenApproximatorEnableToggle" class="toggle__label">
<span class="toggle__emoji"></span>
<span class="toggle__emoji"></span>
</label>
</div>
<span class="switch-label"
>Enable ChatGPT Token Approximator</span
>
</div>
<!-- Description -->
<div class="text-inside-container mb-16">
<p>
<strong>⚠️ For high performance computers only</strong> — gets
slower with longer conversations!
</p>
<p>
Estimates tokens locally in your browser. Shows
<strong>T</strong> (thread) and <strong>E</strong> (editor)
chips that auto-refresh and can be clicked. Results are rough,
especially with code/non-latin characters.
<strong
>Token counter CANNOT count tokens in files you
upload!</strong
>
</p>
<p>
<strong>Accuracy:</strong> English ±2k below ~10k tokens, ±10k
above. Code/non-English: expect ~50% error. Beyond ~100k:
directional only.
</p>
<p>
<strong>Why care?</strong> Models degrade as context
grows—knowing if you're at ~50k vs ~100k helps you decide to
trim/chunk/summarize. Plus, after specific model token limit,
chat may "forget" previous messages: this is not guaranteed,
as web chats are "black box" - there might be some sort of RAG
for previous messages, however, RAG is not as good as direct
token input.
</p>
<p>
For more information, check model limits/benchmarks (e.g.,
<a
href="https://github.com/adobe-research/NoLiMa"
target="_blank"
rel="noreferrer noopener"
>NoLiMa</a
>). For exact counts use the
<a
href="https://platform.openai.com/tokenizer"
target="_blank"
rel="noreferrer noopener"
>official tokenizer</a
>.
</p>
<p style="font-size: 0.8em; margin-top: 10px">
<a
href="https://github.com/NVIDIA/RULER"
target="_blank"
rel="noreferrer noopener"
>View RULER token counting benchmark</a
>
</p>
<p>
I recommend <strong> experimenting </strong>with different models to find the
best one for your specific use case and language.
</p>
</div>
<!-- Settings (shown when enabled) -->
<div
id="tokenApproxSettingsContainer"
class="is-hidden ml-8"
>
<!-- Calibration Section -->
<div
class="text-inside-container settings-box"
>
<h4
class="settings-box-header"
>
📊 Calibration
</h4>
<p class="text-sm text-muted mb-8">
Scale all token counts up or down if they seem consistently
off
</p>
<div class="row">
<label for="tokenApproxCalibration" class="min-w-120"
>Multiply counts by:</label
>
<input
id="tokenApproxCalibration"
type="number"
inputmode="decimal"
step="0.01"
min="0.01"
max="10"
value="1.00"
style="width: 100px"
title="Multiplies all token estimates by this factor (default 1.00). Use values above 1.0 if counts seem consistently too low for your content, or below 1.0 if they're too high. Helpful for adjusting to your specific mix of languages, code, or writing style."
aria-label="Calibration multiplier"
/>
</div>
</div>
<!-- Display Options Section -->
<div
class="text-inside-container settings-box"
>
<h4
class="settings-box-header"
>
👁️ What to Display
</h4>
<!-- Thread Counter Options -->
<div class="mb-12">
<p class="text-sm text-muted mb-8">
Thread counter (T) shows tokens in entire conversation
</p>
<div class="ml-12">
<div class="my-4">
<label
title="Shows one counter (T) that includes tokens from the entire conversation thread plus any active text editors. This gives you the total context size that would be sent to the AI, including your current draft."
>
<input
type="radio"
name="tokenApproxThreadMode"
value="withEditors"
checked
/>
Thread + editors combined
</label>
</div>
<div class="my-4">
<label
title="Shows one counter (T) that counts only the conversation thread, ignoring text in editors. Useful if you want to see just the conversation history without your current draft affecting the count."
>
<input
type="radio"
name="tokenApproxThreadMode"
value="ignoreEditors"
/>
Thread only (ignore editors)
</label>
</div>
<div style="margin: 4px 0">
<label
title="Hides the thread counter completely if you only want to see editor token counts. Choose this if you only care about tracking tokens in your current draft text."
>
<input
type="radio"
name="tokenApproxThreadMode"