diff options
| author | Hakaba Hitoyo <example@example.com> | 2018-05-05 00:20:19 +0900 |
|---|---|---|
| committer | Hakaba Hitoyo <example@example.com> | 2018-05-05 00:20:19 +0900 |
| commit | 2ade177d5a8f487014f8e790d2ed1c0f9e8ebb75 (patch) | |
| tree | 5df9fa6800b9ccaf10e11e09a23c8684f47b4c1f /src/components/who_to_follow_panel | |
| parent | 77ffa894642b358fd9478207f519f991f3780545 (diff) | |
configurable who to follow panel
Diffstat (limited to 'src/components/who_to_follow_panel')
| -rw-r--r-- | src/components/who_to_follow_panel/who_to_follow_panel.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/components/who_to_follow_panel/who_to_follow_panel.js b/src/components/who_to_follow_panel/who_to_follow_panel.js index 47952d21..d62a1515 100644 --- a/src/components/who_to_follow_panel/who_to_follow_panel.js +++ b/src/components/who_to_follow_panel/who_to_follow_panel.js @@ -69,8 +69,10 @@ function getWhoToFollow (panel) { panel.name2 = 'Loading...' panel.name3 = 'Loading...' var host = window.location.hostname - var url = 'https://vinayaka.distsn.org/cgi-bin/vinayaka-user-match-simple-api.cgi?' + - encodeURIComponent(host) + '+' + encodeURIComponent(user) + var whoToFollowProvider = this.$store.state.config.whoToFollowProvider + var url + url = whoToFollowProvider.replace(/{{host}}/g, encodeURIComponent(host)) + url = url.replace(/{{user}}/g, encodeURIComponent(user)) window.fetch(url, {mode: 'cors'}).then(function (response) { if (response.ok) { return response.json() @@ -104,8 +106,10 @@ const WhoToFollowPanel = { moreUrl: function () { var host = window.location.hostname var user = this.user - var url = 'https://vinayaka.distsn.org/?' + - encodeURIComponent(host) + '+' + encodeURIComponent(user) + var whoToFollowLink = this.$store.state.config.whoToFollowLink + var url + url = whoToFollowLink.replace(/{{host}}/g, encodeURIComponent(host)) + url = url.replace(/{{user}}/g, encodeURIComponent(user)) return url }, showWhoToFollowPanel () { |
