Skip to content

Commit 37f2a7b

Browse files
committed
"version": "0.0.6.0",
1 parent d63537e commit 37f2a7b

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

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.5.9",
5+
"version": "0.0.6.0",
66
"icons": {
77
"16": "icon16.png",
88
"32": "icon32.png",

modules/selector-auto-detector/index.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -129,18 +129,25 @@ window.OneClickPromptsSelectorAutoDetector = {
129129
? this.settings.enableStopButtonHeuristics === true
130130
: this.settings.enableContainerHeuristics === true;
131131

132+
// If heuristics are disabled, stop early and SILENTLY.
133+
if (!heuristicsAllowed) {
134+
logConCgp(`[SelectorAutoDetector] ${type} not found. Heuristics disabled; skipping recovery silently.`);
135+
s.recovering = false;
136+
return null;
137+
}
138+
132139
// Readable name for the type
133140
const typeName = type === 'editor' ? 'Text input area'
134141
: type === 'sendButton' ? 'send button'
135142
: type === 'stopButton' ? 'stop button'
136143
: 'button container';
137144

138-
// Unified message logic
139-
const statusSuffix = heuristicsAllowed ? "Trying to find it..." : "Auto-detect is off.";
140-
const toastType = heuristicsAllowed ? 'info' : 'error';
145+
// Unified message logic (only reached if heuristicsAllowed is true)
146+
const statusSuffix = "Trying to find it...";
147+
const toastType = 'info';
141148

142149
if (window.showToast) {
143-
if (type === 'container' && heuristicsAllowed) {
150+
if (type === 'container') {
144151
if (!s.containerNotFoundToastEverShown && !s.containerNotFoundToastDismissed) {
145152
s.containerNotFoundToastEverShown = true;
146153
window.showToast('OneClickPrompts: Container where I can insert buttons is not found. Trying to find it automatically, results may disappoint you…', toastType, {
@@ -155,13 +162,6 @@ window.OneClickPromptsSelectorAutoDetector = {
155162
logConCgp(`[SelectorAutoDetector] ${typeName} not found. ${statusSuffix}`);
156163
}
157164

158-
// If heuristics are disabled, stop here.
159-
if (!heuristicsAllowed) {
160-
logConCgp(`[SelectorAutoDetector] Heuristics disabled for ${type}; skipping recovery.`);
161-
s.recovering = false;
162-
return null;
163-
}
164-
165165
const site = window.InjectionTargetsOnWebsite?.activeSite || 'Unknown';
166166

167167
// Wait a moment for the UI to stabilize (e.g. if the button is just about to appear)

popup.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
<span class="menu-btn-icon">↔️</span>Wider
6161
</button>
6262
</nav>
63-
<div id="version" class="small-hoovering-text menu-version">Version 0.0.5.9</div>
63+
<div id="version" class="small-hoovering-text menu-version">Version 0.0.6.0</div>
6464
</section>
6565

6666
<!-- Button Configuration via button cards (buttons have their UI - each on card that is added dynamically) -->

0 commit comments

Comments
 (0)