From 9014ca462461b56972d2516bba48cc1523dbd33f Mon Sep 17 00:00:00 2001 From: Rafael dos Santos Silva Date: Thu, 19 Apr 2018 17:00:05 -0300 Subject: [PATCH] FEATURE: Enable the Web Share Target API This will allow a Discourse instance that was installed[1] to receive share events. See https://wicg.github.io/web-share-target/ for the spec. 1: https://developers.google.com/web/fundamentals/app-install-banners/ --- app/controllers/metadata_controller.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/controllers/metadata_controller.rb b/app/controllers/metadata_controller.rb index f8d75cfb3df..e5993b7a69c 100644 --- a/app/controllers/metadata_controller.rb +++ b/app/controllers/metadata_controller.rb @@ -21,6 +21,9 @@ class MetadataController < ApplicationController display: 'standalone', orientation: 'natural', start_url: "#{Discourse.base_uri}/", + share_target: { + url_template: 'new-topic?title={title}&body={text}%0A%0A{url}' + }, background_color: "##{ColorScheme.hex_for_name('secondary')}", theme_color: "##{ColorScheme.hex_for_name('header_background')}", icons: [