Skip to content

Commit 20a99b6

Browse files
author
Maxim Fomin
committed
Fix button type to prevent form submission and bump version to 0.0.2.2
1 parent a07d07b commit 20a99b6

File tree

4 files changed

+4
-2
lines changed

4 files changed

+4
-2
lines changed

buttons.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ window.MaxExtensionButtons = {
3636
*/
3737
createCustomSendButton: function (buttonConfig, buttonIndex, onClickHandler) {
3838
const customButtonElement = document.createElement('button');
39+
customButtonElement.type = 'button'; // Prevent form being defaut type, that is "submit".
3940
customButtonElement.innerHTML = buttonConfig.icon;
4041
customButtonElement.setAttribute('data-testid', `custom-send-button-${buttonIndex}`);
4142

floating-panel-ui-creation.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ window.MaxExtensionFloatingPanel.positionPanelAtCursor = function(event) {
261261
*/
262262
window.MaxExtensionFloatingPanel.createPanelToggleButton = function() {
263263
const toggleButton = document.createElement('button');
264+
toggleButton.type = 'button'; // Prevent form submission!
264265
toggleButton.innerHTML = '🔼';
265266
toggleButton.style.cssText = `
266267
background-color: transparent;

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"manifest_version": 3,
33
"name": "OneClickPrompts",
44
"description": "One Click Prompts for AI chat interfaces",
5-
"version": "0.0.2.1",
5+
"version": "0.0.2.2",
66

77
"icons": {
88
"16": "icon16.png",

popup.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ <h2>Profile</h2>
3232
<button id="copyProfile">Duplicate Current Profile To A New One</button>
3333
<button id="deleteProfile" class="danger">Delete</button>
3434
<div id="versionContainer">
35-
<p id="version"> Version 0.0.2.1</p>
35+
<p id="version"> Version 0.0.2.2</p>
3636
<p id="topExplanationText"> Your changes to the buttons will be saved automatically. Reload website to apply. Pressing
3737
"Shift" while pressing a key or button changes its autosend behavior!
3838

0 commit comments

Comments
 (0)