Permalink
Browse files

Fix inline Chrome extension installation

Add the missing <link rel="chrome-webstore-item"> link
required for inline installation of Chrome extensions.

Previously the install link JS was failing due to this
and the result was that the user got directed to the
Chrome Web Store.

Fixes #2830
  • Loading branch information...
robertknight committed Jan 6, 2016
1 parent 38e57f8 commit 4b48f23597f92eb1d05652db4c486da6955623a4
Showing with 10 additions and 3 deletions.
  1. +4 −1 h/home.py
  2. +3 −1 h/templates/home.html.jinja2
  3. +3 −1 h/templates/old-home.html.jinja2
View
@@ -6,7 +6,10 @@
request_method='GET',
renderer='h:templates/old-home.html.jinja2')
def index(context, request):
context = {}
context = {
"chrome_extension_link": ("https://chrome.google.com/webstore/detail/"
"bjfhmglciegochdpefhhlphglcehbmek")
}
if request.authenticated_user:
username = request.authenticated_user.username
@@ -7,6 +7,8 @@
{% block meta %}
{{ super() }}
<link rel='canonical' href='{{ base_url }}'>
<link rel="chrome-webstore-item"
href="{{ chrome_extension_link }}">
<link href="{{ rss_feed_url }}" rel="alternate" type="application/rss+xml">
{% endblock %}
@@ -33,7 +35,7 @@
<div class="home__section installer">
<a class="install-btn is-hidden js-install-chrome"
href="https://chrome.google.com/webstore/detail/bjfhmglciegochdpefhhlphglcehbmek"
href="{{ chrome_extension_link }}"
onclick="chrome.webstore.install();return false;"
data-chromeext-button="">
<img alt="" class="install-btn__icon"
@@ -7,6 +7,8 @@
{% block meta %}
{{ super() }}
<link rel='canonical' href='{{ base_url }}'>
<link rel="chrome-webstore-item"
href="{{ chrome_extension_link }}">
<link href="{{ rss_feed_url }}" rel="alternate" type="application/rss+xml">
{% endblock %}
@@ -128,7 +130,7 @@
<span class="hidden unhide-in-chrome">
<a class="btn btn-primary hidden-xs"
href="https://chrome.google.com/webstore/detail/bjfhmglciegochdpefhhlphglcehbmek"
href="{{ chrome_extension_link }}"
onclick="chrome.webstore.install();return false;"
data-chromeext-button="">
<img alt="" class="installer__browser-logo--chrome"

0 comments on commit 4b48f23

Please sign in to comment.