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:
parent
46b0d69321
commit
1e0d9aaada
1 changed files with 12 additions and 1 deletions
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue