feat(GoogleThat): add an option to disable the embed from rendering (#751)

Co-authored-by: thororen1234 <78185467+thororen1234@users.noreply.github.com>
This commit is contained in:
Unstable 2026-02-08 17:08:59 +01:00 • committed by GitHub
parent 46b0d69321
commit 1e0d9aaada
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -18,9 +18,15 @@ function getMessage(opts) {
queryURL = "" + [settings.store.customEngineURL] + encodeURIComponent(inputOption);
}
if (settings.store.hyperlink) {
if (settings.store.hyperlink && !settings.store.embed) {
return `[${inputOption}](<${queryURL}>)`;
}
else if (settings.store.hyperlink) {
return `[${inputOption}](${queryURL})`;
}
else if (!settings.store.embed) {
return `<${queryURL}>`;
}
else {
return queryURL;
}
@ -45,6 +51,11 @@ const settings = definePluginSettings({
description: "If the sent link should hyperlink with the query as the label",
default: false
},
embed: {
type: OptionType.BOOLEAN,
description: "If the sent link should render an embed",
default: true
},
defaultEngine: {
type: OptionType.SELECT,
description: "The search engine to use",