diff --git a/src/equicordplugins/googleThat/index.tsx b/src/equicordplugins/googleThat/index.tsx index c666f9aee..18f6753c3 100644 --- a/src/equicordplugins/googleThat/index.tsx +++ b/src/equicordplugins/googleThat/index.tsx @@ -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",