summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2021-10-27 23:42:09 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2021-10-27 23:42:09 +0900
commitc2ae160d2326ab2854224cb98811d8fb47e95231 (patch)
tree2c7d0655958d6a920f31d6e575a9b0d9d43fe111 /src
parent要らなさそう (diff)
downloadsharkey-c2ae160d2326ab2854224cb98811d8fb47e95231.tar.gz
sharkey-c2ae160d2326ab2854224cb98811d8fb47e95231.tar.bz2
sharkey-c2ae160d2326ab2854224cb98811d8fb47e95231.zip
refactor
Diffstat (limited to 'src')
-rw-r--r--src/client/components/google.vue12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/client/components/google.vue b/src/client/components/google.vue
index 6d8ae0b5bf..be724f038d 100644
--- a/src/client/components/google.vue
+++ b/src/client/components/google.vue
@@ -10,7 +10,12 @@ import { defineComponent } from 'vue';
import * as os from '@client/os';
export default defineComponent({
- props: ['q'],
+ props: {
+ q: {
+ type: String,
+ required: true,
+ }
+ },
data() {
return {
query: null,
@@ -21,10 +26,7 @@ export default defineComponent({
},
methods: {
search() {
- const engine = this.$store.state.webSearchEngine ||
- 'https://www.google.com/search?q={{query}}';
- const url = engine.replace('{{query}}', this.query)
- window.open(url, '_blank');
+ window.open(`https://www.google.com/search?q=${this.query}`, '_blank');
}
}
});